From fe839e90d9416424c68a2d525d720f7905ef964b Mon Sep 17 00:00:00 2001 From: Robin Eklind Date: Fri, 9 Aug 2019 12:08:22 +0200 Subject: [PATCH] diablo: rename spszMsgTbl and spszMsgKeyTbl to NetMsgStr and NetMsgHotKey Rationale described in sanctuary/notes@3cd6417cdfafba340145939c2054ec614e1bd33e as included below: Infer the name of NetMsgStr and NetMsgHotKey from the PSX debug names of: char *PanBtnHotKey[8]; unsigned long PanBtnStr[8]; Note, the previous use of spsz hungarian notation has been removed since searching for "spsz" gave no results in the merged output of PSX debug info: https://github.com/diasurgical/scalpel/tree/master/psx/_dump_/_dump_merge_c_ --- Source/diablo.cpp | 8 ++++---- Source/diablo.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 86d9e352c..2356435d8 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -56,13 +56,13 @@ int framerate; int framestart; #endif BOOL FriendlyMode = TRUE; -char *spszMsgTbl[4] = { +char *NetMsgStr[4] = { "I need help! Come Here!", "Follow me.", "Here's something for you.", "Now you DIE!" }; -char *spszMsgKeyTbl[4] = { "F9", "F10", "F11", "F12" }; +char *NetMsgHotKey[4] = { "F9", "F10", "F11", "F12" }; void FreeGameMem() { @@ -994,8 +994,8 @@ void diablo_hotkey_msg(DWORD dwMsg) } strcat(szFileName, "\\Diablo.ini"); - /// ASSERT: assert(dwMsg < sizeof(spszMsgTbl) / sizeof(spszMsgTbl[0])); - GetPrivateProfileString("NetMsg", spszMsgKeyTbl[dwMsg], spszMsgTbl[dwMsg], szMsg, sizeof(szMsg), szFileName); + /// ASSERT: assert(dwMsg < sizeof(NetMsgStr) / sizeof(NetMsgStr[0])); + GetPrivateProfileString("NetMsg", NetMsgHotKey[dwMsg], NetMsgStr[dwMsg], szMsg, sizeof(szMsg), szFileName); NetSendCmdString(-1, szMsg); } diff --git a/Source/diablo.h b/Source/diablo.h index 312a2d240..0409479ef 100644 --- a/Source/diablo.h +++ b/Source/diablo.h @@ -173,7 +173,7 @@ extern int framerate; extern int framestart; #endif extern BOOL FriendlyMode; -extern char *spszMsgTbl[4]; -extern char *spszMsgKeyTbl[4]; +extern char *NetMsgStr[4]; +extern char *NetMsgHotKey[4]; #endif /* __DIABLO_H__ */