mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Started units spawn functions and major refactoring
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
#include "framework.h"
|
||||
#include "LUAUtils.h"
|
||||
|
||||
namespace DCSUtils
|
||||
{
|
||||
void LogInfo(lua_State* L, string message);
|
||||
void LogWarning(lua_State* L, string message);
|
||||
void LogError(lua_State* L, string message);
|
||||
void Log(lua_State* L, string message, int level);
|
||||
|
||||
map<int, json::value> getAllUnits(lua_State* L);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
#pragma once
|
||||
#include "framework.h"
|
||||
|
||||
namespace LUAUtils
|
||||
{
|
||||
void stackUpdate(lua_State* L, int& stackDepth, int initialStack = 0);
|
||||
void stackPop(lua_State* L, int popDepth = 1);
|
||||
void stackClean(lua_State* L, int stackDepth);
|
||||
json::value tableToJSON(lua_State* L, int index);
|
||||
}
|
||||
|
||||
#define STACK_UPDATE LUAUtils::stackUpdate(L, stackDepth, initialStack);
|
||||
#define STACK_INIT int stackDepth = 0; int initialStack = 0; LUAUtils::stackUpdate(L, initialStack);
|
||||
#define STACK_POP(X) LUAUtils::stackPop(L, X); STACK_UPDATE;
|
||||
#define STACK_CLEAN STACK_UPDATE; LUAUtils::stackClean(L, stackDepth);
|
||||
@@ -1,26 +0,0 @@
|
||||
#pragma once
|
||||
#include "framework.h"
|
||||
|
||||
#define LOGGER Logger::GetLogger()
|
||||
class Logger
|
||||
{
|
||||
public:
|
||||
void Log(const std::string& sMessage);
|
||||
void Log(const std::wstring& sMessage);
|
||||
void Log(const char* format, ...);
|
||||
|
||||
Logger& operator<<(const string& sMessage);
|
||||
|
||||
static Logger* GetLogger();
|
||||
private:
|
||||
Logger();
|
||||
Logger(const Logger&) {}; // copy constructor is private
|
||||
Logger& operator=(const Logger&) { return *this; }; // assignment operator is private
|
||||
|
||||
static const std::string m_sFileName;
|
||||
static Logger* m_pThis;
|
||||
static ofstream m_Logfile;
|
||||
|
||||
void Open();
|
||||
void Close();
|
||||
};
|
||||
@@ -7,15 +7,12 @@ struct Coords {
|
||||
double alt = 0;
|
||||
};
|
||||
|
||||
bool operator== (const Coords& a, const Coords& b);
|
||||
bool operator!= (const Coords& a, const Coords& b);
|
||||
bool operator== (const Coords& a, const int& b);
|
||||
bool operator!= (const Coords& a, const int& b);
|
||||
// Get current date/time, format is YYYY-MM-DD.HH:mm:ss
|
||||
const DllExport std::string CurrentDateTime();
|
||||
std::wstring DllExport to_wstring(const std::string& str);
|
||||
std::string DllExport to_string(const std::wstring& wstr);
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
// Get current date/time, format is YYYY-MM-DD.HH:mm:ss
|
||||
const std::string CurrentDateTime();
|
||||
std::wstring to_wstring(const std::string& str);
|
||||
std::string to_string(const std::wstring& wstr);
|
||||
}
|
||||
bool DllExport operator== (const Coords& a, const Coords& b);
|
||||
bool DllExport operator!= (const Coords& a, const Coords& b);
|
||||
bool DllExport operator== (const Coords& a, const int& b);
|
||||
bool DllExport operator!= (const Coords& a, const int& b);
|
||||
|
||||
Reference in New Issue
Block a user