Skip to content

Commit

Permalink
add english wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
hhhxiao committed Jan 26, 2021
1 parent ea8f2f3 commit b59b0fb
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 33 deletions.
14 changes: 3 additions & 11 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
![](img/logo.png)
简体中文 |[English](./README_en.md)

## 这是什么

Expand Down Expand Up @@ -36,6 +37,7 @@ Trapdoor是一个为 Minecraft Bedrock Edition 服务的,基于原版服务端
### 玩家

感谢下面的玩家提供的优秀建议与反馈的bug:

- 木月酸与云龙碱
- 莵道三室戸
- orange_31
Expand All @@ -46,6 +48,7 @@ Trapdoor是一个为 Minecraft Bedrock Edition 服务的,基于原版服务端
- Origin 0110

## 代码贡献者

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
Expand Down
70 changes: 70 additions & 0 deletions README_en.md
Original file line number Diff line number Diff line change
@@ -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

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://github.com/hhhxiao"><img src="https://avatars0.githubusercontent.com/u/33011851?v=4?s=100" width="100px;" alt=""/><br /><sub><b>AgNO3</b></sub></a><br /><a href="https://github.com/hhhxiao/TrapDoor/commits?author=hhhxiao" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/OEOTYAN"><img src="https://avatars2.githubusercontent.com/u/58554322?v=4?s=100" width="100px;" alt=""/><br /><sub><b>OEOTYAN</b></sub></a><br /><a href="https://github.com/hhhxiao/TrapDoor/commits?author=OEOTYAN" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/xiaohengying"><img src="https://avatars2.githubusercontent.com/u/44132837?v=4?s=100" width="100px;" alt=""/><br /><sub><b>xiaohengying</b></sub></a><br /><a href="https://github.com/hhhxiao/TrapDoor/commits?author=xiaohengying" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/quizhizhe"><img src="https://avatars1.githubusercontent.com/u/42761326?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Qiuzhizhe</b></sub></a><br /><a href="https://github.com/hhhxiao/TrapDoor/commits?author=quizhizhe" title="Code">💻</a></td>
</tr>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

## license

GPL
44 changes: 22 additions & 22 deletions api/tools/DirtyLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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");
Expand All @@ -88,7 +88,7 @@ namespace trapdoor {
}

void setDevMode(bool useDevMode) {
devMode = useDevMode;
devMode = useDevMode;
}
}

0 comments on commit b59b0fb

Please sign in to comment.