Skip to content

Commit

Permalink
Update: Change src dir
Browse files Browse the repository at this point in the history
  • Loading branch information
i0gan committed Sep 29, 2024
1 parent 2a30f76 commit 78b8568
Show file tree
Hide file tree
Showing 355 changed files with 433 additions and 416 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,8 @@ add_definitions(-D_X64 -D_CONSOLE -DSQUICK_DYNAMIC_PLUGIN -DSQUICK_ENABLE_SSL)
add_definitions(-DSQUICK_LOG_OPEN_STDOUT) # Log stdout print

add_subdirectory(src/struct)
add_subdirectory(src/squick)
add_subdirectory(src/node)
add_subdirectory(src/tutorial)
add_subdirectory(src/core)
add_subdirectory(src/plugin)


if( EXTRA STREQUAL "EXTRA" )
Expand Down
2 changes: 1 addition & 1 deletion res
Submodule res updated 1 files
+2 −5 ExportTable.sh
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "platform.h"
#include <functional>
#include <list>
#include <squick/core/guid.h>
#include <core/guid.h>
#include <vector>

class IPlugin;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/squick/core/performance.h → src/core/performance.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <iostream>
#include <squick/core/base.h>
#include <core/base.h>
#include <time.h>
class Performance {
private:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "third_party/rapidxml/rapidxml_iterators.hpp"
#include "third_party/rapidxml/rapidxml_print.hpp"
#include "third_party/rapidxml/rapidxml_utils.hpp"
#include <squick/core/base.h>
#include <core/base.h>

PluginManager::PluginManager() : IPluginManager() {
appID = 0;
Expand All @@ -20,7 +20,7 @@ PluginManager::PluginManager() : IPluginManager() {
mGetFileContentFunctor = nullptr;

configPath = ".."; // 主要服务路径
configName = "config/plugin/plugin.xml"; // 默认插件加载路径
configName = "config/plugin.xml"; // 默认插件加载路径
}

PluginManager::~PluginManager() {}
Expand Down Expand Up @@ -64,7 +64,7 @@ bool PluginManager::LoadPluginConfig() {
rapidxml::xml_node<> *pRoot = xDoc.first_node();
if (pRoot == nullptr) {
SQUICK_PRINT("Cannot load plugin config from :" + strFilePath);
SQUICK_PRINT("Please check your working directory, make sure config file in the [../config/plugin/] directory.");
SQUICK_PRINT("Please check your working directory, make sure config file in the [../config/] directory.");
return false;
}
rapidxml::xml_node<> *pAppNameNode = pRoot->first_node(appName.c_str());
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "plugin_server.h"
#include <squick/core/base.h>
#include <squick/core/exception.h>
#include <core/base.h>
#include <core/exception.h>
#include <algorithm>

PluginServer::PluginServer(const std::string &strArgv) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/main.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <iostream>
#include <squick/core/base.h>
#include <squick/core/plugin_server.h>
#include <core/base.h>
#include <core/plugin_server.h>
#include <struct/struct.h>

#if PLATFORM == PLATFORM_WIN
Expand Down
6 changes: 6 additions & 0 deletions src/plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
add_subdirectory(core)
add_subdirectory(node)

if( MODE STREQUAL "dev" )
add_subdirectory(tutorial)
endif()
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "actor.h"
#include <squick/core/i_plugin_manager.h>
#include <core/i_plugin_manager.h>

Actor::Actor(const Guid id, IActorModule *pModule) {
this->id = id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#include "i_actor_module.h"
#include "i_component_module.h"
#include <map>
#include <squick/core/guid.h>
#include <squick/core/map_ex.h>
#include <squick/core/platform.h>
#include <squick/core/queue.h>
#include <core/guid.h>
#include <core/map_ex.h>
#include <core/platform.h>
#include <core/queue.h>
#include <string>

class Actor : public IActor {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include <queue>
#include <string>

#include <squick/core/queue.h>
#include <squick/plugin/thread/export.h>
#include <core/queue.h>
#include <plugin/core/thread/export.h>

#include "actor.h"
#include "i_actor_module.h"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include "i_component_module.h"
#include <squick/core/i_module.h>
#include <core/i_module.h>

class IActorModule : public IModule {
public:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#pragma once
#include <memory>
#include <squick/core/guid.h>
#include <squick/core/i_module.h>
#include <squick/core/memory_counter.h>
#include <squick/core/platform.h>
#include <core/guid.h>
#include <core/i_module.h>
#include <core/memory_counter.h>
#include <core/platform.h>

class ActorMessage;
class IComponent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "plugin.h"
#include "actor_module.h"
#include <squick/core/i_module.h>
#include <core/i_module.h>

SQUICK_EXPORT void SquickPluginLoad(IPluginManager *pm){CREATE_PLUGIN(pm, ActorPlugin)};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#include <squick/core/i_plugin.h>
#include <squick/core/i_plugin_manager.h>
#include <core/i_plugin.h>
#include <core/i_plugin_manager.h>

//////////////////////////////////////////////////////////////////////////
class ActorPlugin : public IPlugin {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
#include "i_element_module.h"
#include <iostream>
#include <map>
#include <squick/core/data_list.h>
#include <squick/core/i_plugin_manager.h>
#include <squick/core/list.h>
#include <squick/core/map.h>
#include <squick/core/property_manager.h>
#include <squick/core/record.h>
#include <squick/core/record_manager.h>
#include <core/data_list.h>
#include <core/i_plugin_manager.h>
#include <core/list.h>
#include <core/map.h>
#include <core/property_manager.h>
#include <core/record.h>
#include <core/record_manager.h>
#include <string>
#include <third_party/rapidxml/rapidxml.hpp>
#include <thread>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#pragma once

#include "i_common_config_module.h"
#include <squick/core/i_plugin_manager.h>
#include <squick/core/map_ex.h>
#include <squick/core/platform.h>
#include <core/i_plugin_manager.h>
#include <core/map_ex.h>
#include <core/platform.h>
class ConfigModule : public ICommonConfigModule {
public:
public:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
#include "i_element_module.h"
#include <iostream>
#include <map>
#include <squick/core/data_list.h>
#include <squick/core/list.h>
#include <squick/core/map.h>
#include <squick/core/property_manager.h>
#include <squick/core/record.h>
#include <squick/core/record_manager.h>
#include <squick/plugin/log/i_log_module.h>
#include <core/data_list.h>
#include <core/list.h>
#include <core/map.h>
#include <core/property_manager.h>
#include <core/record.h>
#include <core/record_manager.h>
#include <plugin/core/log/i_log_module.h>
#include <string>
#include <third_party/rapidxml/rapidxml.hpp>
#include <third_party/rapidxml/rapidxml_iterators.hpp>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#define SQUICK_INTF_LOGICCLASS_MODULE_H

#include <iostream>
#include <squick/core/i_module.h>
#include <squick/core/i_object.h>
#include <core/i_module.h>
#include <core/i_object.h>

typedef std::function<int(const Guid &, const std::string &, const CLASS_OBJECT_EVENT, const DataList &)> CLASS_EVENT_FUNCTOR;
typedef std::shared_ptr<CLASS_EVENT_FUNCTOR> CLASS_EVENT_FUNCTOR_PTR; // EVENT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#define SQUICK_INTF_COMMONCONFIG_MODULE_H

#include <iostream>
#include <squick/core/i_module.h>
#include <core/i_module.h>

class ICommonConfigModule : public IModule {
public:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#pragma once

#include <iostream>
#include <squick/core/data_list.h>
#include <squick/core/i_module.h>
#include <squick/core/property_manager.h>
#include <squick/core/record_manager.h>
#include <core/data_list.h>
#include <core/i_module.h>
#include <core/property_manager.h>
#include <core/record_manager.h>

class IElementModule : public IModule {
public:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#include <squick/core/i_plugin.h>
#include <squick/core/i_plugin_manager.h>
#include <core/i_plugin.h>
#include <core/i_plugin_manager.h>
//////////////////////////////////////////////////////////////////////////
class ConfigPlugin : public IPlugin {
public:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
// Github: https://github.com/pwnsky/squick
// Description: Export current plugin's all modules in a single header file
#pragma once
// #include <squick/core/easylogging++.h>
// #include <core/easylogging++.h>
#include "i_log_module.h"
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

#pragma once

#include <squick/core/base.h>
#include <squick/core/i_module.h>
#include <core/base.h>
#include <core/i_module.h>
#include <third_party/easyloggingpp/easylogging++.h>

#ifdef SQUICK_DEV
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#include "log_module.h"

#include "plugin.h"
#include "squick/core/exception.h"
#include <squick/core/termcolor.h>
#include "core/exception.h"
#include <core/termcolor.h>
#include <stdarg.h>

// Ref https://github.com/abumq/easyloggingpp;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "i_log_module.h"
#include <squick/core/performance.h>
#include <core/performance.h>

class LogModule : public ILogModule {
public:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include <squick/core/i_plugin.h>
#include <squick/core/i_plugin_manager.h>
#include <core/i_plugin.h>
#include <core/i_plugin_manager.h>
class LogPlugin : public IPlugin {
public:
LogPlugin(IPluginManager *p) { pm_ = p; }
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
#include <google/protobuf/descriptor.h>
#include <google/protobuf/descriptor.pb.h>
#include <google/protobuf/dynamic_message.h>
#include <squick/core/base.h>
#include <squick/plugin/log/i_log_module.h>
#include <core/base.h>
#include <plugin/core/log/i_log_module.h>
#if PLATFORM != PLATFORM_WIN
#include "squick/core/exception.h"
#include "core/exception.h"
#endif

class MultiFileErrorCollector : public google::protobuf::compiler::MultiFileErrorCollector {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
// #define LUAINTF_LINK_LUA_COMPILED_IN_CXX 0

#include "lua_pb_module.h"
#include <squick/plugin/config/export.h>
#include <squick/plugin/log/export.h>
#include <squick/plugin/net/export.h>
#include <squick/plugin/utils/export.h>
#include <squick/plugin/world/export.h>
#include <plugin/core/config/export.h>
#include <plugin/core/log/export.h>
#include <plugin/core/net/export.h>
#include <plugin/core/utils/export.h>
#include <plugin/core/world/export.h>
#define LUA_UPDATE_INTERVAL_TIME 100 // ms

#if PLATFORM == PLATFORM_WIN
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <squick/core/i_plugin.h>
#include <squick/core/i_plugin_manager.h>
#include <core/i_plugin.h>
#include <core/i_plugin_manager.h>

class LuaScriptPlugin : public IPlugin {
public:
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#pragma once

#include <squick/core/guid.h>
#include <squick/core/i_module.h>
#include <squick/core/map.h>
#include <squick/core/vector3.h>
#include <core/guid.h>
#include <core/i_module.h>
#include <core/map.h>
#include <core/vector3.h>
#include <third_party/ajson/ajson.hpp>
#include <third_party/nlohmann/json.hpp>
using json = nlohmann::json;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <squick/core/i_module.h>
#include <core/i_module.h>

class INavigationModule : public IModule {
public:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#pragma once
#include <memory>
#include <squick/plugin/config/export.h>
#include <squick/plugin/log/export.h>
#include <squick/plugin/net/export.h>
#include <squick/plugin/utils/export.h>
#include <squick/plugin/world/export.h>
#include <plugin/core/config/export.h>
#include <plugin/core/log/export.h>
#include <plugin/core/net/export.h>
#include <plugin/core/utils/export.h>
#include <plugin/core/world/export.h>
// #include "squick/base/no_sql.h"
#include "i_navigation_data_module.h"

// #include "server/game/plugin/server/if_server_module.h"
// #include "server/game/plugin/client/if_world_module.h"
// #include "server/game/plugin/core/server/if_server_module.h"
// #include "server/game/plugin/core/client/if_world_module.h"
////////////////////////////////////////////////////////////////////////////

class NavigationDataModule : public INavigationDataModule {
Expand Down
Loading

0 comments on commit 78b8568

Please sign in to comment.