From b59b0fb8349bdde2f22c83310c57dbacce2eff88 Mon Sep 17 00:00:00 2001
From: hhhxiao <1417599491@qq.com>
Date: Tue, 26 Jan 2021 11:17:14 +0800
Subject: [PATCH] add english wiki
---
.idea/workspace.xml | 14 ++------
README.md | 3 ++
README_en.md | 70 +++++++++++++++++++++++++++++++++++++++
api/tools/DirtyLogger.cpp | 44 ++++++++++++------------
4 files changed, 98 insertions(+), 33 deletions(-)
create mode 100644 README_en.md
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 8469e0f..102ec5d 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -14,19 +14,10 @@
+
-
-
-
-
-
-
-
+
-
-
-
-
@@ -122,6 +113,7 @@
+
diff --git a/README.md b/README.md
index eb50216..3b360cf 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
![](img/logo.png)
+简体中文 |[English](./README_en.md)
## 这是什么
@@ -36,6 +37,7 @@ Trapdoor是一个为 Minecraft Bedrock Edition 服务的,基于原版服务端
### 玩家
感谢下面的玩家提供的优秀建议与反馈的bug:
+
- 木月酸与云龙碱
- 莵道三室戸
- orange_31
@@ -46,6 +48,7 @@ Trapdoor是一个为 Minecraft Bedrock Edition 服务的,基于原版服务端
- Origin 0110
## 代码贡献者
+
diff --git a/README_en.md b/README_en.md
new file mode 100644
index 0000000..e2595c6
--- /dev/null
+++ b/README_en.md
@@ -0,0 +1,70 @@
+![](img/logo.png)
+[简体中文] (./README.md)|English
+
+## What's this
+
+Trapdoor is a dll plugin(mod) used for BDS,which porvides rich functions for survival players.It's similar to je's carpet mod.
+
+## Install & Usage
+
+[Chinese Trapdoor Wiki](https://github.com/hhhxiao/TrapDoor/wiki)
+
+## Credits
+
+### Minecraft
+
+[Minecraft](https://www.minecraft.net/zh-hans)
+
+### 3rd-party libs or codes
+
+- [https://github.com/microsoft/Detours](https://github.com/microsoft/Detours)
+
+- [https://github.com/zhkj-liuxiaohua/MCMODDLL-CPP]( https://github.com/zhkj-liuxiaohua/MCMODDLL-CPP )
+
+- [https://github.com/nlohmann/json](https://github.com/nlohmann/json)
+
+- [https://github.com/DarthTon/Xenos](https://github.com/DarthTon/Xenos)
+
+- [sqlite](https://www.sqlite.org/index.html)
+
+- [https://github.com/progschj/ThreadPool](https://github.com/progschj/ThreadPool)
+
+### Special
+
+Special thanks to Player for providing readable source code
+
+### Players
+
+thanks for the follow game players who make suggestions and feedback bugs:
+
+- 木月酸与云龙碱
+- 莵道三室戸
+- orange_31
+- SAC_Official
+- panda4994万岁
+- 梵蒂冈_273
+- OEOTYAN
+- Origin 0110
+
+## Contributors
+
+
+
+
+
+
+
+
+
+
+
+## license
+
+GPL
diff --git a/api/tools/DirtyLogger.cpp b/api/tools/DirtyLogger.cpp
index fdede90..db7d3d9 100644
--- a/api/tools/DirtyLogger.cpp
+++ b/api/tools/DirtyLogger.cpp
@@ -32,7 +32,7 @@ namespace trapdoor {
//向日志里面打印信息
//如果是开发者模式就打印所有日志,无视日志等级
void logInfo(LOG_LEVEL level, const char *functionName, const char *fmt, ...) {
- // if (logLevel > level && !devMode) return;
+ if (logLevel > level && !devMode) return;
switch (level) {
case LOG_LEVEL::LOG_DEBUG:
setColor(10); //green
@@ -54,29 +54,29 @@ namespace trapdoor {
time_t rawTime;
time(&rawTime);
struct tm *t = localtime(&rawTime);
- // fprintf(logger, "[%.2d-%.2d %.2d:%.2d:%.2d]", t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec);
-// switch (logLevel) {
-// case LOG_LEVEL::LOG_ERROR:
-// fprintf(logger, "[ERROR] ");
-// break;
-// case LOG_LEVEL::LOG_DEBUG:
-// fprintf(logger, "[DEBUG] ");
-// break;
-// case LOG_LEVEL::LOG_INFO:
-// fprintf(logger, "[INFO] ");
-// break;
-// case LOG_LEVEL::LOG_WARNING:
-// fprintf(logger, "[WARN] ");
-// break;
-// case LOG_LEVEL::NO_LOG:
-// break;
-// }
+ fprintf(logger, "[%.2d-%.2d %.2d:%.2d:%.2d]", t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec);
+ switch (logLevel) {
+ case LOG_LEVEL::LOG_ERROR:
+ fprintf(logger, "[ERROR] ");
+ break;
+ case LOG_LEVEL::LOG_DEBUG:
+ fprintf(logger, "[DEBUG] ");
+ break;
+ case LOG_LEVEL::LOG_INFO:
+ fprintf(logger, "[INFO] ");
+ break;
+ case LOG_LEVEL::LOG_WARNING:
+ fprintf(logger, "[WARN] ");
+ break;
+ case LOG_LEVEL::NO_LOG:
+ break;
+ }
fprintf(logger, "(%s) ", functionName);
//输出到桌面(桌面输出不需要输出时间和函数名称)
-// vfprintf(stdout, fmt, args);
-// fprintf(stdout, "\n");
-// fflush(stdout);
+ vfprintf(stdout, fmt, args);
+ fprintf(stdout, "\n");
+ fflush(stdout);
//输出到日志文件
vfprintf(logger, fmt, args);
fprintf(logger, "\n");
@@ -88,7 +88,7 @@ namespace trapdoor {
}
void setDevMode(bool useDevMode) {
- devMode = useDevMode;
+ devMode = useDevMode;
}
}