Compile fixes, needs cleaning up

This commit is contained in:
KimLS
2016-05-24 23:49:25 -07:00
parent 477bf1ba45
commit 9894c1b186
32 changed files with 38 additions and 64 deletions
-1
View File
@@ -132,7 +132,6 @@ SET(common_headers
eqemu_exception.h
eqemu_config.h
eqemu_config_elements.h
eqemu_config_extern.h
eqemu_logsys.h
eq_limits.h
eq_packet.h
-26
View File
@@ -1,26 +0,0 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.org)
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_CONFIG_EXTERN
#define EQEMU_CONFIG_EXTERN
#include "eqemu_config.h"
extern const EQEmuConfig *Config;
#endif
+2 -1
View File
@@ -29,7 +29,7 @@
#endif
#include "types.h"
#include "eqemu_exception.h"
#include "eqemu_config_extern.h"
#include "eqemu_config.h"
namespace EQEmu {
struct IPCMutex::Implementation {
@@ -43,6 +43,7 @@ namespace EQEmu {
IPCMutex::IPCMutex(std::string name) : locked_(false) {
imp_ = new Implementation;
#ifdef _WINDOWS
auto Config = EQEmuConfig::get();
std::string final_name = Config->SharedMemDir + "EQEmuMutex_";
final_name += name;
+3 -3
View File
@@ -31,6 +31,7 @@
#include "../item.h"
#include "rof_structs.h"
#include "../rulesys.h"
#include "../eqemu_config.h"
#include <iostream>
#include <sstream>
@@ -67,6 +68,7 @@ namespace RoF
//create our opcode manager if we havent already
if (opcodes == nullptr) {
//TODO: get this file name from the config file
auto Config = EQEmuConfig::get();
std::string opfile = Config->PatchDir;
opfile += "patch_";
opfile += name;
@@ -98,9 +100,6 @@ namespace RoF
signature.first_length = sizeof(structs::ClientZoneEntry_Struct);
signature.first_eq_opcode = opcodes->EmuToEQ(OP_ZoneEntry);
into.RegisterPatch(signature, pname.c_str(), &opcodes, &struct_strategy);
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Registered patch %s", name);
}
@@ -112,6 +111,7 @@ namespace RoF
if (opcodes != nullptr) {
//TODO: get this file name from the config file
auto Config = EQEmuConfig::get();
std::string opfile = Config->PatchDir;
opfile += "patch_";
opfile += name;
-2
View File
@@ -21,8 +21,6 @@
#define COMMON_ROF_H
#include "../struct_strategy.h"
#include "../eqemu_config_extern.h"
class EQStreamIdentifier;
+3
View File
@@ -31,6 +31,7 @@
#include "../item.h"
#include "rof2_structs.h"
#include "../rulesys.h"
#include "../eqemu_config.h"
#include <iostream>
#include <sstream>
@@ -67,6 +68,7 @@ namespace RoF2
//create our opcode manager if we havent already
if (opcodes == nullptr) {
//TODO: get this file name from the config file
auto Config = EQEmuConfig::get();
std::string opfile = Config->PatchDir;
opfile += "patch_";
opfile += name;
@@ -112,6 +114,7 @@ namespace RoF2
if (opcodes != nullptr) {
//TODO: get this file name from the config file
auto Config = EQEmuConfig::get();
std::string opfile = Config->PatchDir;
opfile += "patch_";
opfile += name;
-2
View File
@@ -21,8 +21,6 @@
#define COMMON_ROF2_H
#include "../struct_strategy.h"
#include "../eqemu_config_extern.h"
class EQStreamIdentifier;
+3
View File
@@ -31,6 +31,7 @@
#include "../item.h"
#include "sod_structs.h"
#include "../rulesys.h"
#include "../eqemu_config.h"
#include <iostream>
#include <sstream>
@@ -63,6 +64,7 @@ namespace SoD
//create our opcode manager if we havent already
if (opcodes == nullptr) {
//TODO: get this file name from the config file
auto Config = EQEmuConfig::get();
std::string opfile = Config->PatchDir;
opfile += "patch_";
opfile += name;
@@ -108,6 +110,7 @@ namespace SoD
if (opcodes != nullptr) {
//TODO: get this file name from the config file
auto Config = EQEmuConfig::get();
std::string opfile = Config->PatchDir;
opfile += "patch_";
opfile += name;
-2
View File
@@ -21,8 +21,6 @@
#define COMMON_SOD_H
#include "../struct_strategy.h"
#include "../eqemu_config_extern.h"
class EQStreamIdentifier;
+3
View File
@@ -31,6 +31,7 @@
#include "../item.h"
#include "sof_structs.h"
#include "../rulesys.h"
#include "../eqemu_config.h"
#include <iostream>
#include <sstream>
@@ -63,6 +64,7 @@ namespace SoF
//create our opcode manager if we havent already
if (opcodes == nullptr) {
//TODO: get this file name from the config file
auto Config = EQEmuConfig::get();
std::string opfile = Config->PatchDir;
opfile += "patch_";
opfile += name;
@@ -108,6 +110,7 @@ namespace SoF
if (opcodes != nullptr) {
//TODO: get this file name from the config file
auto Config = EQEmuConfig::get();
std::string opfile = Config->PatchDir;
opfile += "patch_";
opfile += name;
-2
View File
@@ -21,8 +21,6 @@
#define COMMON_SOF_H
#include "../struct_strategy.h"
#include "../eqemu_config_extern.h"
class EQStreamIdentifier;
+3
View File
@@ -30,6 +30,7 @@
#include "../misc_functions.h"
#include "../string_util.h"
#include "../item.h"
#include "../eqemu_config.h"
#include "titanium_structs.h"
#include <sstream>
@@ -59,6 +60,7 @@ namespace Titanium
void Register(EQStreamIdentifier &into)
{
auto Config = EQEmuConfig::get();
//create our opcode manager if we havent already
if (opcodes == nullptr) {
//TODO: get this file name from the config file
@@ -107,6 +109,7 @@ namespace Titanium
if (opcodes != nullptr) {
//TODO: get this file name from the config file
auto Config = EQEmuConfig::get();
std::string opfile = Config->PatchDir;
opfile += "patch_";
opfile += name;
-2
View File
@@ -21,8 +21,6 @@
#define COMMON_TITANIUM_H
#include "../struct_strategy.h"
#include "../eqemu_config_extern.h"
class EQStreamIdentifier;
+3
View File
@@ -31,6 +31,7 @@
#include "../item.h"
#include "uf_structs.h"
#include "../rulesys.h"
#include "../eqemu_config.h"
#include <iostream>
#include <sstream>
@@ -63,6 +64,7 @@ namespace UF
//create our opcode manager if we havent already
if (opcodes == nullptr) {
//TODO: get this file name from the config file
auto Config = EQEmuConfig::get();
std::string opfile = Config->PatchDir;
opfile += "patch_";
opfile += name;
@@ -108,6 +110,7 @@ namespace UF
if (opcodes != nullptr) {
//TODO: get this file name from the config file
auto Config = EQEmuConfig::get();
std::string opfile = Config->PatchDir;
opfile += "patch_";
opfile += name;
-2
View File
@@ -21,8 +21,6 @@
#define COMMON_UF_H
#include "../struct_strategy.h"
#include "../eqemu_config_extern.h"
class EQStreamIdentifier;
+7 -1
View File
@@ -35,8 +35,8 @@
#include "mysql.h"
#include "rulesys.h"
#include "shareddb.h"
#include "eqemu_config_extern.h"
#include "string_util.h"
#include "eqemu_config.h"
SharedDatabase::SharedDatabase()
: Database()
@@ -811,6 +811,7 @@ bool SharedDatabase::LoadItems(const std::string &prefix) {
items_mmf.reset(nullptr);
try {
auto Config = EQEmuConfig::get();
EQEmu::IPCMutex mutex("items");
mutex.Lock();
std::string file_name = Config->SharedMemDir + prefix + std::string("items");
@@ -1234,6 +1235,7 @@ bool SharedDatabase::LoadNPCFactionLists(const std::string &prefix) {
faction_hash.reset(nullptr);
try {
auto Config = EQEmuConfig::get();
EQEmu::IPCMutex mutex("faction");
mutex.Lock();
std::string file_name = Config->SharedMemDir + prefix + std::string("faction");
@@ -1385,6 +1387,7 @@ bool SharedDatabase::LoadSkillCaps(const std::string &prefix) {
uint32 size = (class_count * skill_count * level_count * sizeof(uint16));
try {
auto Config = EQEmuConfig::get();
EQEmu::IPCMutex mutex("skill_caps");
mutex.Lock();
std::string file_name = Config->SharedMemDir + prefix + std::string("skill_caps");
@@ -1540,6 +1543,7 @@ bool SharedDatabase::LoadSpells(const std::string &prefix, int32 *records, const
spells_mmf.reset(nullptr);
try {
auto Config = EQEmuConfig::get();
EQEmu::IPCMutex mutex("spells");
mutex.Lock();
@@ -1743,6 +1747,7 @@ bool SharedDatabase::LoadBaseData(const std::string &prefix) {
base_data_mmf.reset(nullptr);
try {
auto Config = EQEmuConfig::get();
EQEmu::IPCMutex mutex("base_data");
mutex.Lock();
@@ -1982,6 +1987,7 @@ bool SharedDatabase::LoadLoot(const std::string &prefix) {
loot_drop_mmf.reset(nullptr);
try {
auto Config = EQEmuConfig::get();
EQEmu::IPCMutex mutex("loot");
mutex.Lock();
std::string file_name_lt = Config->SharedMemDir + prefix + std::string("loot_table");