Commit df0160ed authored by mercury233's avatar mercury233 Committed by DailyShana

add show link markers (#1953)

parent a14fdb0d
...@@ -301,6 +301,42 @@ const wchar_t* DataManager::FormatSetName(unsigned long long setcode) { ...@@ -301,6 +301,42 @@ const wchar_t* DataManager::FormatSetName(unsigned long long setcode) {
return unknown_string; return unknown_string;
return scBuffer; return scBuffer;
} }
const wchar_t* DataManager::FormatLinkMarker(int link_marker) {
wchar_t* p = lmBuffer;
if(link_marker & LINK_MARKER_TOP_LEFT) {
BufferIO::CopyWStrRef(L"[ ]", p, 4);
*(p - 2) = 0x2196;
}
if(link_marker & LINK_MARKER_TOP) {
BufferIO::CopyWStrRef(L"[ ]", p, 4);
*(p - 2) = 0x2191;
}
if(link_marker & LINK_MARKER_TOP_RIGHT) {
BufferIO::CopyWStrRef(L"[ ]", p, 4);
*(p - 2) = 0x2197;
}
if(link_marker & LINK_MARKER_LEFT) {
BufferIO::CopyWStrRef(L"[ ]", p, 4);
*(p - 2) = 0x2190;
}
if(link_marker & LINK_MARKER_RIGHT) {
BufferIO::CopyWStrRef(L"[ ]", p, 4);
*(p - 2) = 0x2192;
}
if(link_marker & LINK_MARKER_BOTTOM_LEFT) {
BufferIO::CopyWStrRef(L"[ ]", p, 4);
*(p - 2) = 0x2199;
}
if(link_marker & LINK_MARKER_BOTTOM) {
BufferIO::CopyWStrRef(L"[ ]", p, 4);
*(p - 2) = 0x2193;
}
if(link_marker & LINK_MARKER_BOTTOM_RIGHT) {
BufferIO::CopyWStrRef(L"[ ]", p, 4);
*(p - 2) = 0x2198;
}
return lmBuffer;
}
int DataManager::CardReader(int code, void* pData) { int DataManager::CardReader(int code, void* pData) {
if(!dataManager.GetData(code, (CardData*)pData)) if(!dataManager.GetData(code, (CardData*)pData))
memset(pData, 0, sizeof(CardData)); memset(pData, 0, sizeof(CardData));
......
...@@ -31,6 +31,7 @@ public: ...@@ -31,6 +31,7 @@ public:
const wchar_t* FormatRace(int race); const wchar_t* FormatRace(int race);
const wchar_t* FormatType(int type); const wchar_t* FormatType(int type);
const wchar_t* FormatSetName(unsigned long long setcode); const wchar_t* FormatSetName(unsigned long long setcode);
const wchar_t* FormatLinkMarker(int link_marker);
std::unordered_map<unsigned int, CardDataC> _datas; std::unordered_map<unsigned int, CardDataC> _datas;
std::unordered_map<unsigned int, CardString> _strings; std::unordered_map<unsigned int, CardString> _strings;
...@@ -45,6 +46,7 @@ public: ...@@ -45,6 +46,7 @@ public:
wchar_t racBuffer[128]; wchar_t racBuffer[128];
wchar_t tpBuffer[128]; wchar_t tpBuffer[128];
wchar_t scBuffer[128]; wchar_t scBuffer[128];
wchar_t lmBuffer[32];
static wchar_t strBuffer[4096]; static wchar_t strBuffer[4096];
static const wchar_t* unknown_string; static const wchar_t* unknown_string;
......
...@@ -1043,10 +1043,11 @@ void Game::ShowCardInfo(int code) { ...@@ -1043,10 +1043,11 @@ void Game::ShowCardInfo(int code) {
myswprintf(formatBuffer, L"[LINK-%d] ", cd.level); myswprintf(formatBuffer, L"[LINK-%d] ", cd.level);
wchar_t adBuffer[16]; wchar_t adBuffer[16];
if(cd.attack < 0) if(cd.attack < 0)
myswprintf(adBuffer, L"?/-"); myswprintf(adBuffer, L"?/- ");
else else
myswprintf(adBuffer, L"%d/-", cd.attack); myswprintf(adBuffer, L"%d/- ", cd.attack);
wcscat(formatBuffer, adBuffer); wcscat(formatBuffer, adBuffer);
wcscat(formatBuffer, dataManager.FormatLinkMarker(cd.link_marker));
} }
if(cd.type & TYPE_PENDULUM) { if(cd.type & TYPE_PENDULUM) {
wchar_t scaleBuffer[16]; wchar_t scaleBuffer[16];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment