Random cleanup
This commit is contained in:
parent
320d57599e
commit
9f98190944
@ -1,9 +1,7 @@
|
||||
#include "std_include.hpp"
|
||||
#include "context_initializer.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
namespace game::scripting
|
||||
{
|
||||
context::context() : executer_(this), scheduler_(this), parameters_(this), event_handler_(this)
|
||||
{
|
||||
@ -35,4 +33,3 @@ namespace game
|
||||
return &this->chai_;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,9 +4,7 @@
|
||||
#include "parameters.hpp"
|
||||
#include "event_handler.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
namespace game::scripting
|
||||
{
|
||||
class context final
|
||||
{
|
||||
@ -29,4 +27,3 @@ namespace game
|
||||
event_handler event_handler_;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,7 @@
|
||||
#include "std_include.hpp"
|
||||
#include "context_initializer.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
{
|
||||
namespace context_initializer
|
||||
namespace game::scripting::context_initializer
|
||||
{
|
||||
void initialize_entity(context* context)
|
||||
{
|
||||
@ -240,5 +236,3 @@ namespace game
|
||||
chai->add_global(chaiscript::var(entity(context, level_id)), "level");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,7 @@
|
||||
#pragma once
|
||||
#include "context.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
{
|
||||
namespace context_initializer
|
||||
namespace game::scripting::context_initializer
|
||||
{
|
||||
void initialize(context* context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
#include "std_include.hpp"
|
||||
#include "context.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
namespace game::scripting
|
||||
{
|
||||
entity::entity() : entity(nullptr, 0)
|
||||
{
|
||||
@ -131,4 +129,3 @@ namespace game
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#include "game/game.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
namespace game::scripting
|
||||
{
|
||||
class context;
|
||||
class event_listener_handle;
|
||||
@ -42,4 +40,3 @@ namespace game
|
||||
void release() const;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#include "game/game.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
namespace game::scripting
|
||||
{
|
||||
class event final
|
||||
{
|
||||
@ -13,4 +11,3 @@ namespace game
|
||||
std::vector<native::VariableValue> arguments;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
#include "std_include.hpp"
|
||||
#include "context.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
namespace game::scripting
|
||||
{
|
||||
event_handler::event_handler(context* context) : context_(context)
|
||||
{
|
||||
@ -121,4 +119,3 @@ namespace game
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,9 +3,7 @@
|
||||
#include "entity.hpp"
|
||||
#include "event.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
namespace game::scripting
|
||||
{
|
||||
class context;
|
||||
|
||||
@ -57,4 +55,3 @@ namespace game
|
||||
void remove(const event_listener_handle& handle);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -6,9 +6,7 @@
|
||||
#include "safe_executer.hpp"
|
||||
#include "context.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
namespace game::scripting
|
||||
{
|
||||
executer::executer(context* context) : context_(context)
|
||||
{
|
||||
@ -169,4 +167,3 @@ namespace game
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
namespace game::scripting
|
||||
{
|
||||
class context;
|
||||
|
||||
@ -31,4 +29,3 @@ namespace game
|
||||
static int find_function_index(const std::string& function, bool prefer_global);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
#include "std_include.hpp"
|
||||
#include "functions.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
namespace game::scripting
|
||||
{
|
||||
std::map<std::string, int> instance_function_map =
|
||||
{
|
||||
@ -748,4 +746,3 @@ namespace game
|
||||
{"objective_playerenemyteam", 361},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
namespace game::scripting
|
||||
{
|
||||
extern std::map<std::string, int> instance_function_map;
|
||||
extern std::map<std::string, int> global_function_map;
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
#include "std_include.hpp"
|
||||
#include "context.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
namespace game::scripting
|
||||
{
|
||||
parameters::parameters(context* context) : context_(context)
|
||||
{
|
||||
@ -150,4 +148,3 @@ namespace game
|
||||
return this->load(native::scr_VmPub->top[1 - native::scr_VmPub->outparamcount]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#include "game/game.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
namespace game::scripting
|
||||
{
|
||||
class context;
|
||||
|
||||
@ -20,4 +18,3 @@ namespace game
|
||||
context* context_;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -3,11 +3,8 @@
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4611)
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
{
|
||||
namespace safe_executer
|
||||
|
||||
namespace game::scripting::safe_executer
|
||||
{
|
||||
static_assert(sizeof(jmp_buf) == 64);
|
||||
|
||||
@ -58,6 +55,5 @@ namespace game
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning(pop)
|
||||
|
@ -1,15 +1,9 @@
|
||||
#pragma once
|
||||
#include "game/game.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
{
|
||||
namespace safe_executer
|
||||
namespace game::scripting::safe_executer
|
||||
{
|
||||
bool call(const native::scr_call_t function, const native::scr_entref_t entref);
|
||||
bool set_entity_field(const native::scr_entref_t entref, const int offset);
|
||||
bool get_entity_field(const native::scr_entref_t entref, const int offset, native::VariableValue* value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
#include "std_include.hpp"
|
||||
#include "context.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
namespace game::scripting
|
||||
{
|
||||
scheduler::scheduler(context* context) : context_(context)
|
||||
{
|
||||
@ -96,4 +94,3 @@ namespace game
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#include "utils/concurrent_list.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
namespace game::scripting
|
||||
{
|
||||
class context;
|
||||
|
||||
@ -42,4 +40,3 @@ namespace game
|
||||
void remove(const task_handle& handle);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
#include "std_include.hpp"
|
||||
#include "stack_isolation.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
namespace game::scripting
|
||||
{
|
||||
stack_isolation::stack_isolation()
|
||||
{
|
||||
@ -27,4 +25,3 @@ namespace game
|
||||
native::scr_VmPub->maxstack = this->max_stack_;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#include "game/game.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
namespace game::scripting
|
||||
{
|
||||
class stack_isolation final
|
||||
{
|
||||
@ -20,4 +18,3 @@ namespace game
|
||||
unsigned int out_param_count_;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
#include "std_include.hpp"
|
||||
#include "variable_value.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
namespace game::scripting
|
||||
{
|
||||
variable_value::variable_value(native::VariableValue value) : value_(value)
|
||||
{
|
||||
@ -20,4 +18,3 @@ namespace game
|
||||
return this->value_;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#include "game/game.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
namespace scripting
|
||||
namespace game::scripting
|
||||
{
|
||||
class variable_value final
|
||||
{
|
||||
@ -17,4 +15,3 @@ namespace game
|
||||
native::VariableValue value_;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ namespace demonware
|
||||
auto queue = datagram_packets_.find(s);
|
||||
if (queue != datagram_packets_.end())
|
||||
{
|
||||
const bool blocking = is_blocking_socket(s, UDP_BLOCKING);
|
||||
const auto blocking = is_blocking_socket(s, UDP_BLOCKING);
|
||||
|
||||
lock.unlock();
|
||||
while (blocking && queue->second.empty())
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
<body>
|
||||
<div class="content">
|
||||
<h1>No settings, yet!</h1>
|
||||
<h3>No settings, yet!</h3>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
|
@ -2,9 +2,7 @@
|
||||
#include "memory.hpp"
|
||||
#include "compression.hpp"
|
||||
|
||||
namespace utils
|
||||
{
|
||||
namespace compression
|
||||
namespace utils::compression
|
||||
{
|
||||
std::string zlib::compress(const std::string& data)
|
||||
{
|
||||
@ -70,4 +68,3 @@ namespace utils
|
||||
return buffer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,9 +2,7 @@
|
||||
|
||||
#define CHUNK 16384
|
||||
|
||||
namespace utils
|
||||
{
|
||||
namespace compression
|
||||
namespace utils::compression
|
||||
{
|
||||
class zlib final
|
||||
{
|
||||
@ -13,4 +11,3 @@ namespace utils
|
||||
static std::string decompress(const std::string& data);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -4,9 +4,7 @@
|
||||
|
||||
/// http://www.opensource.apple.com/source/CommonCrypto/CommonCrypto-55010/Source/libtomcrypt/doc/libTomCryptDoc.pdf
|
||||
|
||||
namespace utils
|
||||
{
|
||||
namespace cryptography
|
||||
namespace utils::cryptography
|
||||
{
|
||||
ecc::key::key()
|
||||
{
|
||||
@ -323,4 +321,3 @@ namespace utils
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
namespace utils
|
||||
{
|
||||
namespace cryptography
|
||||
namespace utils::cryptography
|
||||
{
|
||||
class ecc final
|
||||
{
|
||||
@ -92,4 +90,3 @@ namespace utils
|
||||
static unsigned int compute(const char* key, size_t len);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -2,9 +2,7 @@
|
||||
#include "flags.hpp"
|
||||
#include "string.hpp"
|
||||
|
||||
namespace utils
|
||||
{
|
||||
namespace flags
|
||||
namespace utils::flags
|
||||
{
|
||||
void parse_flags(std::vector<std::string>& flags)
|
||||
{
|
||||
@ -49,4 +47,3 @@ namespace utils
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
namespace utils
|
||||
{
|
||||
namespace flags
|
||||
namespace utils::flags
|
||||
{
|
||||
bool has_flag(const std::string& flag);
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
#include <std_include.hpp>
|
||||
#include "io.hpp"
|
||||
|
||||
namespace utils
|
||||
{
|
||||
namespace io
|
||||
namespace utils::io
|
||||
{
|
||||
bool file_exists(const std::string& file)
|
||||
{
|
||||
@ -107,4 +105,3 @@ namespace utils
|
||||
return files;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
namespace utils
|
||||
{
|
||||
namespace io
|
||||
namespace utils::io
|
||||
{
|
||||
bool file_exists(const std::string& file);
|
||||
bool write_file(const std::string& file, const std::string& data, bool append = false);
|
||||
@ -14,4 +12,3 @@ namespace utils
|
||||
bool directory_is_empty(const std::string& directory);
|
||||
std::vector<std::string> list_files(const std::string& directory);
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
#include <std_include.hpp>
|
||||
#include "nt.hpp"
|
||||
|
||||
namespace utils
|
||||
{
|
||||
namespace nt
|
||||
namespace utils::nt
|
||||
{
|
||||
module module::load(const std::string& name)
|
||||
{
|
||||
@ -204,4 +202,3 @@ namespace utils
|
||||
ntdll.invoke_pascal<void>("NtRaiseHardError", 0xC000007B, 0, nullptr, nullptr, 6, &data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
namespace utils
|
||||
{
|
||||
namespace nt
|
||||
namespace utils::nt
|
||||
{
|
||||
class module final
|
||||
{
|
||||
@ -88,4 +86,3 @@ namespace utils
|
||||
|
||||
void raise_hard_exception();
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
#include <std_include.hpp>
|
||||
#include "string.hpp"
|
||||
|
||||
namespace utils
|
||||
{
|
||||
namespace string
|
||||
namespace utils::string
|
||||
{
|
||||
const char* va(const char* fmt, ...)
|
||||
{
|
||||
@ -55,4 +53,3 @@ namespace utils
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#include "memory.hpp"
|
||||
|
||||
namespace utils
|
||||
{
|
||||
namespace string
|
||||
namespace utils::string
|
||||
{
|
||||
template <size_t Buffers, size_t MinBufferSize>
|
||||
class va_provider final
|
||||
@ -81,4 +79,3 @@ namespace utils
|
||||
|
||||
std::string dump_hex(const std::string& data, const std::string& separator = " ");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user