Skip to content

Commit 2ef7b57

Browse files
committed
fix:修正排八门时从寄宫开始转的BUG。
1 parent c1fe9c0 commit 2ef7b57

File tree

5 files changed

+17
-10
lines changed

5 files changed

+17
-10
lines changed

.vscode/settings.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"files.autoSave": "onFocusChange",
33
"editor.fontSize": 14,
4-
"editor.fontFamily": "'Mononoki Nerd Font Mono', 'Mononoki Nerd Font Mono', 'Mononoki Nerd Font Mono'",
4+
"editor.fontFamily": "'Cousine Nerd Font Mono', 'Cousine Nerd Font Mono', 'Cousine Nerd Font Mono'",
55
"cmake.configureOnOpen": true,
66
"cmake.debugConfig": {
77
"console": "integratedTerminal",
@@ -15,6 +15,12 @@
1515
"text": "-enable-pretty-printing",
1616
"ignoreFailures": true
1717
}
18+
],
19+
"args": [
20+
"-d",
21+
"2024-7-9-9-10-0",
22+
"-t",
23+
"3"
1824
]
1925
},
2026
"cmake.options.statusBarVisibility": "visible",

CMakeLists.txt

+6-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ set(CMAKE_CXX_STANDARD 11)
55
set(CMAKE_CXX_STANDARD_REQUIRED ON)
66

77
if (MSVC)
8-
if (GBK)
9-
add_compile_options(/source-charset:utf-8)
10-
else()
11-
add_compile_options(/utf-8)
12-
endif()
8+
# if (GBK)
9+
# add_compile_options(/source-charset:utf-8)
10+
# else()
11+
# add_compile_options(/utf-8)
12+
# endif()
13+
add_compile_options(/source-charset:utf-8)
1314
# 以下抑制,主要作用与三方库。
1415
add_compile_options(/wd4018) #有符号与无符号的比较
1516
add_compile_options(/wd4800) #将值强制为布尔值“true”或“false”(性能警告)

ReadMe.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ git clone --recursive https://github.com/taynpg/csp
8484
cd csp
8585
mkdir build
8686
cd build
87-
(1.非MSVC编译器)cmake ..
88-
(2.如果是MSVC编译器) cmake .. -DGBK=True
87+
cmake ..
8988
cmake --build . --config release
9089
```
9190

box_qimen/qm_v1.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -337,13 +337,14 @@ void CQiMenV1::genBaMen()
337337
}
338338

339339
// m_nBamenPre 中仅有 8 个数据,当值符值使位置在中宫8的时候,转成寄宫
340+
// 但是转的时候不从寄宫开始转
340341
int startPos = m_nZhiShiPos;
341342
if (startPos == 8) {
342343
startPos = m_nJiGongPos;
343344
}
344345

345346
// m_nPos2GuaNum 用于位置转卦序
346-
int guaIndex = m_nPos2GuaNum[startPos];
347+
int guaIndex = m_nPos2GuaNum[m_nZhiShiPos];
347348

348349
for (int i = 0; i < ndiff; ++i) {
349350
guaIndex = cb::getRemainder(9, guaIndex += nk);

csp_base.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef CSP_HEADER_H
22
#define CSP_HEADER_H
33

4-
#define CSP_VERSION "v1.3.2"
4+
#define CSP_VERSION "v1.3.3"
55

66
#include "box_calendar/calendar_base.h"
77

0 commit comments

Comments
 (0)