Skip to content

Commit

Permalink
small refactor with raw keys
Browse files Browse the repository at this point in the history
git-svn-id: https://subversion.assembla.com/svn/d2bs@1848 080cfd25-d5d9-4c59-82ea-70d02a200d8b
  • Loading branch information
bobode committed Nov 25, 2014
1 parent c9a19e3 commit 1c05599
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion branches/bob-18/D2BS.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#define XP_WIN

#define D2BS_VERSION "1.5.1847" //uptodate with d branch 1765 ff 20b
#define D2BS_VERSION "1.5.1848" //uptodate with d branch 1765 ff 20b

#include <windows.h>
#include <vector>
Expand Down
5 changes: 0 additions & 5 deletions branches/bob-18/D2Handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,3 @@ void GameLeave(void)
// EnterCriticalSection(&Vars.cGameLoopSection);
}

void SetKeys()
{
*p_BNCLIENT_XPacKey = Vars.szLod;
*p_BNCLIENT_ClassicKey = Vars.szClassic;
}
2 changes: 1 addition & 1 deletion branches/bob-18/D2Handlers.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ void GameLeave(void);
void CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
VOID __fastcall ClassicSTUB();
VOID __fastcall LodSTUB();
void SetKeys(void);
6 changes: 4 additions & 2 deletions branches/bob-18/D2Intercepts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,17 +317,19 @@ void __declspec(naked) RemoveUnit_Intercept(UnitAny* lpUnit)

VOID __declspec(naked) __fastcall ClassicSTUB()
{
*p_BNCLIENT_ClassicKey = Vars.szClassic;
__asm{
call SetKeys

jmp BNCLIENT_DClass;
}

}

VOID __declspec(naked) __fastcall LodSTUB()
{
*p_BNCLIENT_XPacKey = Vars.szLod;
__asm{
call SetKeys

jmp BNCLIENT_DLod;
}

Expand Down

0 comments on commit 1c05599

Please sign in to comment.