From 6855860d6416f8ea992fa9f0a88297b11cf48105 Mon Sep 17 00:00:00 2001 From: Lenheart <947330670@qq.com> Date: Tue, 7 Apr 2026 21:45:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0.editorconfig?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=B9=B6=E8=B0=83=E6=95=B4=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加.editorconfig文件以统一代码风格配置 将GameMap.h中的debugMode_设为true并禁用movableAreaCheckEnabled_以方便调试 更新AGENTS.md文档,添加代理偏好设置说明 --- .editorconfig | 12 ++++++++++++ AGENTS.md | 7 ++++++- Game/include/map/GameMap.h | 4 ++-- 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..f46ab2e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[*.{c,cc,cpp,cxx,h,hh,hpp,hxx,ipp,ixx,lua}] +indent_style = space +indent_size = 2 diff --git a/AGENTS.md b/AGENTS.md index c5e1b24..0d04cd8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,6 +2,11 @@ This guide helps agentic coding agents work effectively with the Frostbite2D 2D game engine codebase. +## Agent Preferences + +- Communicate with the user in Chinese by default unless they explicitly ask for another language. +- Treat UTF-8 as the default encoding for new or edited text and source files; do not introduce ANSI or GBK encoded files. + ## Build Commands ### Basic Build @@ -206,4 +211,4 @@ if (asset.readTextFile("file.txt", content)) { - **Path separators**: Use Asset class, it handles platform differences - **Encoding**: Project uses UTF-8, Asset handles Windows UTF-8 paths - **Memory leaks**: Use smart pointers, ensure proper cleanup in destructors -- **OpenGL context**: Initialize only after window creation \ No newline at end of file +- **OpenGL context**: Initialize only after window creation diff --git a/Game/include/map/GameMap.h b/Game/include/map/GameMap.h index f92becd..cdb914d 100644 --- a/Game/include/map/GameMap.h +++ b/Game/include/map/GameMap.h @@ -93,9 +93,9 @@ private: int backgroundRepeatWidth_ = 0; /// 地图配置里的整体 Y 偏移;既影响层位置,也影响地板校准。 int mapOffsetY_ = 0; - bool debugMode_ = false; + bool debugMode_ = true; /// 硬编码调试开关:关闭后忽略可行走区域检测,允许角色自由移动。 - bool movableAreaCheckEnabled_ = true; + bool movableAreaCheckEnabled_ = false; /// 当前地图正在播放的背景音乐。 Ptr currentMusic_; };