Fix AMTL internal paths

This commit is contained in:
Arkshine 2015-09-30 19:08:39 +02:00
parent f811bab608
commit 2d910838a2
56 changed files with 128 additions and 129 deletions

View File

@ -12,7 +12,6 @@
#include <FileSystem.h> // IFileSystem, FileSystemSeek_t, FileHandle_t (HLSDK)
#include <stdio.h> // FILE*
#include <am-cxx.h> // KE_OVERRIDE
extern IFileSystem* g_FileSystem;
@ -38,7 +37,7 @@ class FileObject
virtual bool EndOfFile() = 0;
virtual void Close() = 0;
virtual ValveFile *AsValveFile()
virtual ValveFile *AsValveFile()
{
return nullptr;
}
@ -55,7 +54,7 @@ class ValveFile : public FileObject
ValveFile(FileHandle_t handle) : handle_(handle) {}
~ValveFile()
~ValveFile()
{
Close();
}
@ -65,10 +64,10 @@ class ValveFile : public FileObject
return g_FileSystem->FileExists(file);
}
static ValveFile* Open(const char* filename, const char* mode, const char* pathID)
static ValveFile* Open(const char* filename, const char* mode, const char* pathID)
{
FileHandle_t handle = g_FileSystem->OpenFromCacheForRead(filename, mode, pathID);
if (!handle)
{
return nullptr;
@ -77,7 +76,7 @@ class ValveFile : public FileObject
return new ValveFile(handle);
}
static bool Delete(const char* filename, const char* pathID)
static bool Delete(const char* filename, const char* pathID)
{
if (!Exists(filename))
{
@ -94,49 +93,49 @@ class ValveFile : public FileObject
return true;
}
size_t Read(void* pOut, size_t size) KE_OVERRIDE
size_t Read(void* pOut, size_t size) override
{
return static_cast<size_t>(g_FileSystem->Read(pOut, size, handle_));
}
char* ReadLine(char* pOut, size_t size) KE_OVERRIDE
char* ReadLine(char* pOut, size_t size) override
{
return g_FileSystem->ReadLine(pOut, size, handle_);
}
size_t Write(const void* pData, size_t size) KE_OVERRIDE
size_t Write(const void* pData, size_t size) override
{
return static_cast<size_t>(g_FileSystem->Write(pData, size, handle_));
}
bool Seek(int pos, int seek_type) KE_OVERRIDE
bool Seek(int pos, int seek_type) override
{
g_FileSystem->Seek(handle_, pos, static_cast<FileSystemSeek_t>(seek_type));
return !HasError();
}
int Tell() KE_OVERRIDE
int Tell() override
{
return g_FileSystem->Tell(handle_);
}
bool HasError() KE_OVERRIDE
bool HasError() override
{
return !handle_ || !g_FileSystem->IsOk(handle_);
}
int Flush() KE_OVERRIDE
int Flush() override
{
g_FileSystem->Flush(handle_);
return 0;
}
bool EndOfFile() KE_OVERRIDE
bool EndOfFile() override
{
return g_FileSystem->EndOfFile(handle_);
}
void Close() KE_OVERRIDE
void Close() override
{
if (handle_)
{
@ -144,8 +143,8 @@ class ValveFile : public FileObject
handle_ = nullptr;;
}
}
virtual ValveFile* AsValveFile()
virtual ValveFile* AsValveFile()
{
return this;
}
@ -167,12 +166,12 @@ class SystemFile : public FileObject
SystemFile(FILE* fp) : fp_(fp) {}
~SystemFile()
~SystemFile()
{
Close();
}
static SystemFile* Open(const char* path, const char* mode)
static SystemFile* Open(const char* path, const char* mode)
{
FILE* fp = fopen(path, mode);
@ -184,52 +183,52 @@ class SystemFile : public FileObject
return new SystemFile(fp);
}
static bool Delete(const char* path)
static bool Delete(const char* path)
{
return unlink(path) == 0;
}
size_t Read(void* pOut, size_t size) KE_OVERRIDE
size_t Read(void* pOut, size_t size) override
{
return fread(pOut, 1, size, fp_);
}
char* ReadLine(char* pOut, size_t size) KE_OVERRIDE
char* ReadLine(char* pOut, size_t size) override
{
return fgets(pOut, size, fp_);
}
size_t Write(const void* pData, size_t size) KE_OVERRIDE
size_t Write(const void* pData, size_t size) override
{
return fwrite(pData, 1, size, fp_);
}
bool Seek(int pos, int seek_type) KE_OVERRIDE
bool Seek(int pos, int seek_type) override
{
return fseek(fp_, pos, seek_type) == 0;
}
int Tell() KE_OVERRIDE
int Tell() override
{
return ftell(fp_);
}
bool HasError() KE_OVERRIDE
bool HasError() override
{
return ferror(fp_) != 0;
}
int Flush() KE_OVERRIDE
int Flush() override
{
return fflush(fp_);
}
bool EndOfFile() KE_OVERRIDE
bool EndOfFile() override
{
return feof(fp_) != 0;
}
void Close() KE_OVERRIDE
void Close() override
{
if (fp_)
{
@ -237,7 +236,7 @@ class SystemFile : public FileObject
fp_ = nullptr;
}
}
virtual SystemFile* AsSystemFile()
{
return this;

View File

@ -12,9 +12,9 @@
#include <IGameConfigs.h>
#include "CLibrarySys.h"
#include <am-vector.h>
#include <am-string.h>
#include <am-refcounting.h>
#include <amtl/am-vector.h>
#include <amtl/am-string.h>
#include <amtl/am-refcounting.h>
#include <sm_stringhashmap.h>
#include <sm_namehashset.h>

View File

@ -12,7 +12,7 @@
#include "amx.h" // cell
#include <interface.h> // Interface (HLSDK)
#include <am-utility.h> // AutoPtr
#include <amtl/am-utility.h> // AutoPtr
#define PLATFORM_WINDOWNS_NAME "windows"
#define PLATFORM_LINUX_NAME "linux"

View File

@ -13,8 +13,8 @@
#include "sh_list.h"
#include "amx.h"
#include "amxxfile.h"
#include <am-string.h>
#include <am-vector.h>
#include <amtl/am-string.h>
#include <amtl/am-vector.h>
// *****************************************************
// class CPluginMngr

View File

@ -33,7 +33,7 @@
#define _INCLUDE_SOURCEMOD_TEXTPARSERS_H_
#include <ITextParsers.h>
#include <am-vector.h>
#include <amtl/am-vector.h>
/**
* @param void * IN: Stream pointer

View File

@ -11,8 +11,8 @@
#define CVARS_H
#include "amxmodx.h"
#include <am-vector.h>
#include <am-inlinelist.h>
#include <amtl/am-vector.h>
#include <amtl/am-inlinelist.h>
#include <sm_namehashset.h>
class CDetour;

View File

@ -36,8 +36,8 @@
#include "CPlugin.h"
#include "CLibrarySys.h"
#include <auto-string.h>
#include <am-string.h>
#include <am-vector.h>
#include <amtl/am-string.h>
#include <amtl/am-vector.h>
#include "CMisc.h"
#include "CVault.h"
#include "CModule.h"

View File

@ -12,7 +12,7 @@
#if defined BINLOG_ENABLED
#include <am-string.h>
#include <amtl/am-string.h>
#define BINLOG_MAGIC 0x414D424C
#define BINLOG_VERSION 0x0300

View File

@ -9,7 +9,7 @@
#include "amxmodx.h"
#include "datastructs.h"
#include <am-utility.h>
#include <amtl/am-utility.h>
NativeHandle<CellArray> ArrayHandles;

View File

@ -10,7 +10,7 @@
#ifndef _NATIVES_NATIVES_HANDLES_H_
#define _NATIVES_NATIVES_HANDLES_H_
#include <am-vector.h>
#include <amtl/am-vector.h>
// Note: All handles start at 1. 0 and below are invalid handles.
// This way, a plugin that doesn't initialize a vector or

View File

@ -96,7 +96,7 @@ public:
}
private:
Entry(const Entry &other) KE_DELETE;
Entry(const Entry &other) = delete;
ArrayInfo *ensureArray(size_t bytes) {
ArrayInfo *array = raw();

View File

@ -18,7 +18,7 @@
#include "CstrikeUserMessages.h"
#include "CstrikeHLTypeConversion.h"
#include <CDetour/detours.h>
#include <am-vector.h>
#include <amtl/am-vector.h>
bool NoKifesMode = false;

View File

@ -17,7 +17,7 @@
#include <amxxmodule.h>
#include "CstrikeUtils.h"
#include "CstrikeHacks.h"
#include <am-vector.h>
#include <amtl/am-vector.h>
extern ke::Vector<int> ModelsUpdateQueue;

View File

@ -23,9 +23,9 @@
#include "entity.h"
#include "gpglobals.h"
#include "entity_state.h"
#include <am-vector.h>
#include <am-string.h>
#include "CDetour/detours.h"
#include <amtl/am-vector.h>
#include <amtl/am-string.h>
#include <CDetour/detours.h>
extern DLL_FUNCTIONS *g_pFunctionTable;
extern DLL_FUNCTIONS *g_pFunctionTable_Post;

View File

@ -23,8 +23,8 @@
#include "forward.h"
#include "fm_tr.h"
#include "glb.h"
#include <am-string.h>
#include <am-vector.h>
#include <amtl/am-string.h>
#include <amtl/am-vector.h>
#include <IGameConfigs.h>
#include <HLTypeConversion.h>

View File

@ -14,7 +14,7 @@
#ifndef _INCLUDE_TR_H
#define _INCLUDE_TR_H
#include <am-string.h>
#include <amtl/am-string.h>
extern TraceResult *gfm_tr;

View File

@ -14,7 +14,7 @@
#ifndef _INCLUDE_FORWARD_H
#define _INCLUDE_FORWARD_H
#include <am-vector.h>
#include <amtl/am-vector.h>
#define ENGFUNC_NUM FM_LAST_DONT_USE_ME // 131

View File

@ -12,7 +12,7 @@
//
#include "fakemeta_amxx.h"
#include <am-algorithm.h>
#include <amtl/am-algorithm.h>
enum class BaseFieldType
{

View File

@ -15,8 +15,8 @@
#include "geoip_natives.h"
#include "geoip_util.h"
#include <am-string.h>
#include <am-vector.h>
#include <amtl/am-string.h>
#include <amtl/am-vector.h>
// native geoip_code2(const ip[], ccode[3]);
// Deprecated.

View File

@ -14,8 +14,8 @@
#ifndef _INCLUDE_GEOIPNATIVES_H
#define _INCLUDE_GEOIPNATIVES_H
#include <am-string.h>
#include <am-vector.h>
#include <amtl/am-string.h>
#include <amtl/am-vector.h>
extern MMDB_s HandleDB;
extern ke::Vector<ke::AString> LangList;

View File

@ -13,8 +13,8 @@
#include "amxxmodule.h"
#include <am-vector.h>
#include <am-string.h>
#include <amtl/am-vector.h>
#include <amtl/am-string.h>
#include <sh_stack.h>
#include "DataHandler.h"

View File

@ -15,8 +15,8 @@
#define RETURNHANDLER_H
#include "ham_utils.h"
#include <am-vector.h>
#include <am-string.h>
#include <amtl/am-vector.h>
#include <amtl/am-string.h>
#include <sh_stack.h>
enum

View File

@ -41,7 +41,7 @@
#include <stdlib.h> // memalign
#include <stdio.h>
#include <am-utility.h>
#include <amtl/am-utility.h>
namespace Trampolines
{

View File

@ -15,7 +15,7 @@
#include <extdll.h>
#include "NEW_Util.h"
#include <am-vector.h>
#include <amtl/am-vector.h>
#include "forward.h"
#include "hook.h"
#include "ham_const.h"

View File

@ -18,8 +18,8 @@
#include "hooklist.h"
#include "forward.h"
#include "hook.h"
#include <am-vector.h>
#include <am-string.h>
#include <amtl/am-vector.h>
#include <amtl/am-string.h>
extern ke::Vector<Hook *> hooks[HAM_LAST_ENTRY_DONT_USE_ME_LOL];

View File

@ -16,7 +16,7 @@
#ifndef FORWARD_H
#define FORWARD_H
#include <am-refcounting.h>
#include <amtl/am-refcounting.h>
enum fwdstate
{

View File

@ -16,7 +16,7 @@
#include "forward.h"
#include "Trampolines.h"
#include <am-vector.h>
#include <amtl/am-vector.h>
#define ALIGN(ar) ((intptr_t)ar & ~(sysconf(_SC_PAGESIZE)-1))

View File

@ -19,8 +19,8 @@
#include <extdll.h>
#include "amxxmodule.h"
#include <am-vector.h>
#include <am-string.h>
#include <amtl/am-vector.h>
#include <amtl/am-string.h>
#include <sh_stack.h>
#include "hook.h"

View File

@ -28,7 +28,7 @@
#include "hooklist.h"
#include "ham_utils.h"
#include "hook_specialbot.h"
#include <am-vector.h>
#include <amtl/am-vector.h>
OffsetManager Offsets;

View File

@ -15,7 +15,7 @@
#define HOOK_SPECIALBOT_H
#include "ham_utils.h"
#include <am-vector.h>
#include <amtl/am-vector.h>
#include "forward.h"
class CRegisterHamParams

View File

@ -13,7 +13,7 @@
#include "amxxmodule.h"
#include <stdarg.h>
#include <am-vector.h>
#include <amtl/am-vector.h>
#include "ham_const.h"
#include "hooklist.h"
#include "offsets.h"

View File

@ -13,7 +13,7 @@
#include <string.h>
#include <sh_stack.h>
#include <am-vector.h>
#include <amtl/am-vector.h>
#include "mysql2_header.h"
struct QHandle

View File

@ -8,7 +8,7 @@
// https://alliedmods.net/amxmodx-license
#include "BaseWorker.h"
#include <am-linkedlist.h>
#include <amtl/am-linkedlist.h>
BaseWorker::BaseWorker() :
m_perFrame(SM_DEFAULT_THREADS_PER_FRAME),

View File

@ -10,7 +10,7 @@
#ifndef _INCLUDE_SOURCEMOD_BASEWORKER_H
#define _INCLUDE_SOURCEMOD_BASEWORKER_H
#include <am-linkedlist.h>
#include <amtl/am-linkedlist.h>
#include "ThreadSupport.h"
#define SM_DEFAULT_THREADS_PER_FRAME 1

View File

@ -16,7 +16,7 @@
#include "IThreader.h"
#include "ISQLDriver.h"
#include <am-string.h>
#include <amtl/am-string.h>
#include <sh_stack.h>
struct QueuedResultInfo

View File

@ -23,8 +23,8 @@
#ifndef ALLOCSTRING_H
#define ALLOCSTRING_H
#include <am-string.h>
#include <am-linkedlist.h>
#include <amtl/am-string.h>
#include <amtl/am-linkedlist.h>
class StringManager
{

View File

@ -17,7 +17,7 @@
#ifndef GAMEMANAGER_H
#define GAMEMANAGER_H
#include <am-string.h>
#include <amtl/am-string.h>
class GameManager
{

View File

@ -14,8 +14,8 @@
#ifndef _HASH_H_
#define _HASH_H_
#include <am-vector.h>
#include <am-string.h>
#include <amtl/am-vector.h>
#include <amtl/am-string.h>
// Just a very simple hash map, no iteration or anything of the like (not needed)

View File

@ -14,7 +14,7 @@
#ifndef LOCATIONMANAGER_H
#define LOCATIONMANAGER_H
#include <am-vector.h>
#include <amtl/am-vector.h>
#include "GameManager.h"
#include "TitleManager.h"

View File

@ -14,8 +14,8 @@
#ifndef PARTICLEMANAGER_H
#define PARTICLEMANAGER_H
#include <am-vector.h>
#include <am-string.h>
#include <amtl/am-vector.h>
#include <amtl/am-string.h>
typedef struct psystem_s
{

View File

@ -14,7 +14,7 @@
#ifndef SPAWNMANAGER_H
#define SPAWNMANAGER_H
#include <am-vector.h>
#include <amtl/am-vector.h>
typedef struct spawndata_s
{

View File

@ -18,7 +18,7 @@
#include <stdlib.h>
#include <string.h>
#include <am-string.h>
#include <amtl/am-string.h>
#include "Hash.h"

View File

@ -17,8 +17,8 @@
#include "utilfunctions.h"
#include "NEW_Util.h"
#include "ParticleManager.h"
#include <am-vector.h>
#include <am-string.h>
#include <amtl/am-vector.h>
#include <amtl/am-string.h>
#define KVI(__KEY) PSKeyValueI(__KEY,amx,params)
#define KVF(__KEY) PSKeyValueF(__KEY,amx,params)

View File

@ -15,9 +15,9 @@
#define _INCLUDE_JOURNAL_H
#include "Binary.h"
#include <am-linkedlist.h>
#include <amtl/am-linkedlist.h>
#include <sm_stringhashmap.h>
#include <am-string.h>
#include <amtl/am-string.h>
enum JOp
{

View File

@ -15,7 +15,7 @@
#include "amxxmodule.h"
#include "NVault.h"
#include "Binary.h"
#include <am-string.h>
#include <amtl/am-string.h>
/**
* :TODO: This beast calls strcpy()/new() way too much by creating new strings on the stack.

View File

@ -14,7 +14,7 @@
#ifndef _INCLUDE_NVAULT_H
#define _INCLUDE_NVAULT_H
#include <am-linkedlist.h>
#include <amtl/am-linkedlist.h>
#include <sm_stringhashmap.h>
#include "IVault.h"
#include "Journal.h"

View File

@ -15,8 +15,8 @@
#define _INCLUDE_AMXXAPI_H
#include "amxxmodule.h"
#include <am-vector.h>
#include <am-string.h>
#include <amtl/am-vector.h>
#include <amtl/am-string.h>
#include <sm_queue.h>
extern AMX_NATIVE_INFO nVault_natives[];

View File

@ -14,8 +14,8 @@
#ifndef _INCLUDE_CREGEX_H
#define _INCLUDE_CREGEX_H
#include <am-vector.h>
#include <am-string.h>
#include <amtl/am-vector.h>
#include <amtl/am-string.h>
/**
* Maximum number of sub-patterns, here 50 (this should be a multiple of 3).

View File

@ -14,8 +14,8 @@
#include <string.h>
#include "pcre.h"
#include "amxxmodule.h"
#include <am-vector.h>
#include <am-utility.h>
#include <amtl/am-vector.h>
#include <amtl/am-utility.h>
#include "CRegEx.h"
#include "utils.h"

View File

@ -13,7 +13,7 @@
#include <string.h>
#include <sh_stack.h>
#include <am-vector.h>
#include <amtl/am-vector.h>
#include "sqlite_header.h"
struct QHandle

View File

@ -14,7 +14,7 @@
#include "amxxmodule.h"
#include "sqlite_header.h"
#include "threading.h"
#include <am-string.h>
#include <amtl/am-string.h>
MainThreader g_Threader;
ThreadWorker *g_pWorker = NULL;

View File

@ -16,8 +16,8 @@
#include "IThreader.h"
#include "ISQLDriver.h"
#include <am-string.h>
#include <am-vector.h>
#include <amtl/am-string.h>
#include <amtl/am-vector.h>
#include <sh_stack.h>
struct QueuedResultInfo

View File

@ -22,7 +22,7 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <am-string.h>
#include <amtl/am-string.h>
namespace ke {

View File

@ -32,7 +32,7 @@
#if defined(__linux__) || defined(__APPLE__)
#include <stdint.h>
#include <am-vector.h>
#include <amtl/am-vector.h>
#include <sm_symtable.h>
#endif

View File

@ -29,7 +29,7 @@
* Version: $Id$
*/
#include <am-moveable.h>
#include <amtl/am-moveable.h>
#ifndef _include_sourcemod_namehashset_h_
#define _include_sourcemod_namehashset_h_
@ -40,9 +40,9 @@
* @brief Stores a set of uniquely named objects.
*/
#include <am-allocator-policies.h>
#include <am-hashmap.h>
#include <am-string.h>
#include <amtl/am-allocator-policies.h>
#include <amtl/am-hashmap.h>
#include <amtl/am-string.h>
#include "sm_stringhashmap.h"
//namespace SourceMod

View File

@ -44,10 +44,10 @@
* NameHashSet instead.
*/
#include <am-allocator-policies.h>
#include <am-hashmap.h>
#include <am-string.h>
#include <am-moveable.h>
#include <amtl/am-allocator-policies.h>
#include <amtl/am-hashmap.h>
#include <amtl/am-string.h>
#include <amtl/am-moveable.h>
#include <string.h>
//namespace SourceMod