Skip to content

Commit

Permalink
update some drawing functions to be more resolution flexible
Browse files Browse the repository at this point in the history
  • Loading branch information
planqi committed Apr 30, 2017
1 parent 012761f commit 6707e51
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions BH/Drawing/Hook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,14 @@ bool Hook::InRange(unsigned int x, unsigned int y) {
* Returns the height of the screen.
*/
unsigned int Hook::GetScreenHeight() {
return ((D2GFX_GetScreenSize() == 0) ? 480 : 600);
return *p_D2CLIENT_ScreenSizeY;
}

/* Hook::GetScreenWidth()
* Returns the width of the screen.
*/
unsigned int Hook::GetScreenWidth() {
return ((D2GFX_GetScreenSize() == 0) ? 640 : 800);
return *p_D2CLIENT_ScreenSizeX;
}

/* Hook::ScreenToAutomap(int x, int y)
Expand Down Expand Up @@ -370,4 +370,4 @@ bool Hook::KeyClick(bool bUp, BYTE bKey, LPARAM lParam) {
if ((*it)->OnKey(bUp, bKey, lParam))
block = true;
return block;
}
}
4 changes: 2 additions & 2 deletions BH/Modules/ScreenInfo/ScreenInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ void ScreenInfo::OnLoad() {
Toggles["Experience Meter"] = BH::config->ReadToggle("Experience Meter", "VK_NUMPAD7", false);

automapInfo = BH::config->ReadArray("AutomapInfo");
bhText = new Texthook(Perm, 795, 6, "BH v0.1.8(beta2b)");
bhText = new Texthook(Perm, 795, 6, "BH v0.1.8(beta2c)");
bhText->SetAlignment(Right);
bhText->SetFont(6);
bhText->SetColor(Gold);

bhText2 = new Texthook(Perm, 2, 592, "BH v0.1.8(beta2b) (SlashDiablo Branch)");
bhText2 = new Texthook(Perm, 2, 592, "BH v0.1.8(beta2c) (SlashDiablo Branch)");
bhText2->SetFont(6);

if (BH::cGuardLoaded) {
Expand Down
Binary file modified Release/BH.dll
Binary file not shown.

0 comments on commit 6707e51

Please sign in to comment.