Skip to content
This repository has been archived by the owner on Dec 21, 2022. It is now read-only.

Commit

Permalink
Town maps now hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
joffreybesos committed Nov 7, 2021
1 parent 8598bb4 commit 4de4747
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## [1.2.6] - 2021-11-07 - Town map no longer shown

- Town maps will now be hidden

## [1.2.5] - 2021-11-06 - Added loading text

- 'Loading' text now shown in place of map while map is downloading
Expand Down
7 changes: 1 addition & 6 deletions src/include/showMap.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ ShowMap(sMapUrl, configuredWidth, leftMargin, topMargin, opacity) {
; hide the map if in town
StringSplit, ua, sMapUrl, "/"
if (ua8 == 1 or ua8 == 40 or ua8 == 75 or ua8 == 103 or ua8 == 109) {
WriteLog("At town mapid " ua8 ", hiding map")
} else {

Gui, 1: -Caption +E0x20 +E0x80000 +LastFound +AlwaysOnTop +ToolWindow +OwnDialogs
hwnd1 := WinExist()
pBitmap := Gdip_CreateBitmapFromFile(sFile)
Expand All @@ -47,13 +47,8 @@ ShowMap(sMapUrl, configuredWidth, leftMargin, topMargin, opacity) {
obm := SelectObject(hdc, hbm)
G := Gdip_GraphicsFromHDC(hdc)
Gdip_SetInterpolationMode(G, 7)

; Gdip_DrawImage(pGraphics, pBitmap, dx, dy, dw, dh, sx, sy, sw, sh, Matrix)
; d is for destination and s is for source.
Gdip_DrawImage(G, pBitmap, 0, 0, scaledWidth, scaledHeight, 0, 0, Width, Height, opacity)

UpdateLayeredWindow(hwnd1, hdc, leftMargin, topMargin, scaledWidth, scaledHeight)

SelectObject(hdc, obm)
DeleteObject(hbm)
DeleteDC(hdc)
Expand Down

0 comments on commit 4de4747

Please sign in to comment.