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_; };