diff --git a/saco/game/util.cpp b/saco/game/util.cpp index 7d54baf..af6d876 100644 --- a/saco/game/util.cpp +++ b/saco/game/util.cpp @@ -1897,6 +1897,20 @@ DWORD GetColorFromEmbedCode(wchar_t *szString) return 0xFFFFFFFF; } +void RemoveColorEmbedsFromString(char *szString) +{ + while(*szString) + { + if(GetColorFromEmbedCode(szString) != 0xFFFFFFFF) + { + strcpy(szString, szString + 8); + continue; + } + szString++; + } + *szString = 0; +} + DWORD unnamed_100B6100(char *szString, int nMaxLen) { char tmp_buf[2049]; diff --git a/saco/game/util.h b/saco/game/util.h index 31db93e..5cfd7be 100644 --- a/saco/game/util.h +++ b/saco/game/util.h @@ -69,3 +69,4 @@ BOOL IsHexChar(char c); BOOL IsHexChar(wchar_t c); DWORD GetColorFromEmbedCode(char *szString); DWORD GetColorFromEmbedCode(wchar_t *szString); +void RemoveColorEmbedsFromString(char *szString); diff --git a/saco/subclass.cpp b/saco/subclass.cpp index 3b053fb..1f0023f 100644 --- a/saco/subclass.cpp +++ b/saco/subclass.cpp @@ -8,7 +8,7 @@ LRESULT APIENTRY NewWndProc(HWND,UINT,WPARAM,LPARAM); //---------------------------------------------------- -void InstallNewWindowProcedure() +void InstallWindowProcedure() { HWND hwndGameWnd = pGame->GetMainWindowHwnd(); @@ -31,7 +31,7 @@ BOOL SubclassGameWindow() DWORD dwStyle = GetClassLong(hwndGameWnd,GCL_STYLE); SetClassLong(hwndGameWnd,GCL_STYLE,dwStyle|CS_DBLCLKS); - InstallNewWindowProcedure(); + InstallWindowProcedure(); SetWindowText(hwndGameWnd,"GTA:SA:MP");