[JOGO] Bulldozer (por TheDewd)

Compartilhe seus scripts, funções, ferramentas e programas

Moderator: Gio

User avatar
Gio
Posts: 700
Joined: 30 Sep 2013, 10:54
Location: Brazil

[JOGO] Bulldozer (por TheDewd)

15 Aug 2018, 11:26

Olá :)

Alguns usuários têm se interessado pela possibilidade de programar jogos usando o AutoHotkey, então decidi trazer para o nosso fórum em português um exemplo de jogo muito bacana feito pelo usuário TheDewd.

O jogo, que se chama Bulldozer (que em português seria "Trator"), é um clone de um jogo 2D de 1994 escrito por John Hattan. Se alguém tiver interesse, o usuário TheDewd também mantém um projeto de engine de jogos 2D baseado em ladrilhos (Wikipedia) que você poderá usar para fazer seus próprios jogos 2D.

Tópico original (em inglês): https://autohotkey.com/boards/viewtopic.php?f=6&t=50139

Bulldozer
Bulldozer é um clone dos jogos originais Bulldozer 1, Bulldozer 2, and Bulldozer 3 criados por John Hattan (The Code Zone).

Bulldozer 1 apareceu primeiro em um CD-ROM de 1994 chamado "24 Games for Windows 95" (24 jogos para windows 95) desenvolvido pela Expert Software, Inc. Bulldozer 2 foi incluído em "Arcade Magic", também publicado pela Expert Software, Inc. Bulldozer 3 foi terminado em 2002, mas não foi lançado até que seu autor juntou todas as 180 fases do jogo em um lançamento de 2008 chamado simplesmente de Bulldozer. A versão de 2008 foi criada usando o Adobe Flash e está disponível em uma variedade de plataformas mobile e de PC. O jogo Bulldozer é uma variação do Sokoban, que é um jogo de puzzle bastante popular.

O objetivo do jogador em Bulldozer é empurrar todas as pedras para os lugares certos definidos pelos alvos. Você poderá mover o trator usando as teclas WASD do seu teclado. O trator só pode empurrar uma pedra por vez, e ele não pode puxar as pedras. Você avançará para a próxima fase assim que cada pedra tenha sido colocada em um dos alvos da fase.

:arrow: Todo o crédito vai para John Hattan pela ideia original da série de jogos Bulldozer. Este projeto foi um exercício de GDI+ e manipulação de strings, e tem o objetivo de prestar tributo ao jogo que o usuário TheDewd (autor do código do jogo em AutoHotkey) jogava em sua infância.

Image Image


Image Download
Revisão 15 (2019-03-01)

Code: Select all

; Script Information ===========================================================
; Name:         Bulldozer
; Description:  Bulldozer is an Autohotkey recreation the original Bulldozer 1,
;               Bulldozer 2, and Bulldozer 3 games originally developed by John
;               Hattan (The Code Zone).
; AHK Version:  1.1.23.00+
; OS Version:   Windows 7+
; Language:     English (United States)
; Author:       Weston Campbell <[email protected]>
; Website:      https://autohotkey.com/boards/viewtopic.php?f=6&t=50139
; ==============================================================================

; Revision History =============================================================
; Revision 15 (2019-03-01)
; * Fixed background color chooser not saving custom color selections
; * Fixed bugs with MidiSound() function
; * Added sound effects for "Undo Last Move"
; * Fixed tile layering issue for custom themes
; * Added menu icons
; * Changed "Level Select" layout
; * Added "Taskbar Progress" option to enable taskbar progressbar updates
; * Added "Titlebar Progress" option to toggle completion status text in title
; * Added option to teleport with a single click if "Mouse Movement" enabled
; * Mark levels 'Solved' or 'Unsolved' by right clicking in "Level Select"
; * Minor UI Changes
; ------------------------------------------------------------------------------
; Revision 14 (2018-08-31)
; * Changed hotkey prevention to use window handle instead of title
; * Fixed levels 64 & 127 not applying "missing target" hotfix after restart
; * Changed Titlebar progress to only check for update when moving an object
; * Added MIDI sound effects
; ------------------------------------------------------------------------------
; Revision 13 (2018-08-28)
; * Added 'Boss Key' hotkey to quickly minimize game window using "Spacebar"
; * Added alternate 'Undo Last Move' hotkey using "Backspace"
; * Added "Page Up" & "Page Down" hotkeys to change levels
; * On-screen level number now indicates level completion status using colors
; * Minor changes to 'Level Select' screen layout
; * Automatically load last played level
; * Show levels from same collection as current level on opening 'Level Select'
; * Added 'Mouse Movement' to control the bulldozer movement with the mouse
; * Fixed level 179 to prevent bulldozer from moving outside of viewable area
; * Improved prevention of unintended tab switching of tab control
; * Fixed tab display issues when toggling menu items while not on game screen
; * Fixed 'Level Select' color status drawing issue
; * Added current level progress in the Titlebar
; ------------------------------------------------------------------------------
; Revision 12 (2018-08-14)
; * Fixed 'Undo Last Move' not working for map strings containing only digits
; ------------------------------------------------------------------------------
; Revision 11 (2018-08-07)
; * Fix memory leak from Level Select status coloring function
; ------------------------------------------------------------------------------
; Revision 10 (2018-08-06)
; * Fixed levels 64 & 127 not showing a target due to bulldozer start location
; * Added level status to the Level Select screen
; ------------------------------------------------------------------------------
; Revision 9 (2018-07-31)
; * Removed password system
; * Improved methods to prevent accidental tab switching
; * Level Select modified to choose any level without password
; * Changed how on-screen level number is displayed
; * Removed save/load
; ------------------------------------------------------------------------------
; Revision 8 (2018-07-26)
; * Fixed inadvertently switching tabs using arrow keys
; * Added additional options to the menus
; ------------------------------------------------------------------------------
; Revision 7 (2018-07-23)
; * Code optimization
; * Background color selection
; * New Fontmap for increased readability of level/password display text
; * Debug Mode
; * Save/Read settings with INI file
; ------------------------------------------------------------------------------
; Revision 6 (2018-06-18)
; * Added 'Undo Last Move' menu option -- Used only after pushing object
; ------------------------------------------------------------------------------
; Revision 5 (2018-06-12)
; * Fixed boundary tile being overwritten when pushing boulder into it
; * Added DPI scaling support
; ------------------------------------------------------------------------------
; Revision 4 (2018-06-11)
; * Added levels from Bulldozer 2 and Bulldozer 3
; * Resized level area for compatibility with maps from Bulldozer 2/Bulldozer 3
; * Optimized level drawing to update changed tiles only.
; * Redesigned 'Level Select' and 'About' menu item contents
; ------------------------------------------------------------------------------
; Revision 3 (2018-06-07)
; * Changed background image update process to prevent flickering
; ------------------------------------------------------------------------------
; Revision 2 (2018-06-06)
; * Fixed font map displaying incorrect character for numbers 8 and 9
; ------------------------------------------------------------------------------
; Revision 1 (2018-06-05)
; * Initial release
; ==============================================================================

; Auto-Execute =================================================================
#SingleInstance, Force ; Allow only one running instance of script
#Persistent ; Keep the script permanently running until terminated
#NoEnv ; Avoid checking empty variables for environment variables
#NoTrayIcon ; Disable the tray icon of the script
#KeyHistory, 0 ; Disable history of keystrokes & mouse clicks
SetWorkingDir, % A_ScriptDir ; Set the working directory of the script
SetBatchLines, -1 ; Run script at maximum speed
SetControlDelay, -1 ; Disable delay to occur after modifying a control
SendMode, Input ; The method for sending keystrokes and mouse clicks
ListLines, Off ; Disable history of executed script lines
CoordMode, Mouse, Client ; Mouse coordinates relative to active window client
OnExit("OnUnload") ; Run function when exiting the script

SetTimer, MenuItemCheck, 250 ; Toggle menu items
SetTimer, EmptyMem, 60000 ; 1 minute
EmptyMem() ; Empty memory

return ; End automatic execution
; ==============================================================================

; Functions ====================================================================
OnLoad() {
	Global ; Assume-global mode
	Static Init := OnLoad() ; Call function

	App_Name := "Bulldozer"
	App_Version := "15"
	App_Date := "2019-03-01"

	GuiWidth := 640 ; Gui Width
	GuiHeight := 512 ; Gui Height
	GuiBGCol := "FFFFFF" ; Gui Background Color
	DPI := (A_ScreenDPI / 96) ; Calculate DPI scaling

	; Read values from INI file
	IniRead, TitlebarProgress, Bulldozer.ini, Options, TitlebarProgress, 0
	IniRead, TaskbarProgress, Bulldozer.ini, Options, TaskbarProgress, 0
	IniRead, BackgroundColor, Bulldozer.ini, Options, BackgroundColor, 808000 ; Olive
	IniRead, Theme, Bulldozer.ini, Options, Theme, Color
	IniRead, UnlimitedUndo, Bulldozer.ini, Options, UnlimitedUndo, 0
	IniRead, Sound, Bulldozer.ini, Options, Sound, 0
	IniRead, LevelNumber, Bulldozer.ini, Options, LevelNumber, 0 ; On-screen level number display
	IniRead, MouseMovement, Bulldozer.ini, Options, MouseMovement, 0
	IniRead, Solved, Bulldozer.ini, Options, Solved, U180 ; Solved level data
	IniRead, LastLevel, Bulldozer.ini, Options, LastLevel, 1 ; Last played level

	UserColors := [] ; Initialize variable

	Loop, 16 {
		IniRead, UserColor%A_Index%, Bulldozer.ini, Options, UserColor%A_Index%, 000000
		UserColors.Push("0x" UserColor%A_Index%)
	}

	Solved := StrSplit(RLE_Decode(Solved)) ; Expand run-length encoded string

	; Overwrite solved level data if corrupted string
	If (Solved.Length() <> 180) {
		IniWrite, U180, Bulldozer.ini, Options, Solved ; Overwrite INI value
		Solved := StrSplit(RLE_Decode("U180")) ; Expand run-length encoded string
	}

	; Level map data
	Maps := [] ; Create array
	Maps[1] := "8888888888888888888888888888888888888888AAAAAAAAAAAAAAAAAAAAA8A8A8888888888A8A8AA8A8A8889998888A8A8AA8A8A8889198888A8A8AA8A8A8889099998A8A8AA8A8A8999202198A8A8AA8A8A8910259998A8A8AA8A8A8999929888A8A8AA8A8A8888919888A8A8AA8A8A8888999888A8A8AA8A8A8888888888A8A8AAAAAAAAAAAAAAAAAAAAA8888888888888888888888888888888888888888"
	Maps[2] := "88888888888888888888888888888888888888888888888888888888888881900000000000000008819000000000000009088090000000000020090880900200000000000008809000000500000009088090000000000000090880900000000000200908809002000000000009088000000000000000091880000000000000000918888888888888888888888888888888888888888888888888888888888888"
	Maps[3] := "8888888888888888888888888888888888888888888888888888888888888D0000000000000000D8880000000009000000888D0009999999000000D8880003000009020000888D0009001059020000D8880009900009020000888D0000900009000000D8880000900009000990888D0000999299000901D888000000000000001188888888888888888888888888888888888888888888888888888888888888"
	Maps[4] := "888888888888888888888888888888888888888888888888888888888888888B88999999998888B88B88889000000988B888888B8990CCCC298888B88B88890000C00988B888888B89020020598888B88B88890200C11988B888888B890000C1198888B88B88890000999988B888888B89000098888888B88B88899999988888B888888888888888888888888888888888888888888888888888888888888888"
	Maps[5] := "8888888888888888888888888888888888888888A888888888888888888A8A8888999998888888A888A88895009888888A88888A889022989998A88888888890209891988888888888999099919888888888888990000198888888888889000900988888888A888900099998A88888A88889999988888A888A8888888888888888A8A888888888888888888A8888888888888888888888888888888888888888"
	Maps[6] := "8888888888888888888888888888888888888888AAAAAAAAAAAAAAAAAAAAA88AAAAAAAAAAAAAA88AA88AAA9999999AAAA88AAAAAAA900000999AAAAAAAAAA9929990009AAAAAAAAAA9500200209AAAAAAAAAA9011902099AAAAAAAAAA991190009AAAAAAAAAAAA99999999AAAAAAA88AAAAAAAAAAAAAA88AA88AAAAAAAAAAAAAA88AAAAAAAAAAAAAAAAAAAAA8888888888888888888888888888888888888888"
	Maps[7] := "8888888888888888888888888888888888888888FAFAF8888888888FAFAFAFAFA8888888888AFAFAFAFAF8899998888FAFAFAFAFA8890599988AFAFAFAFAF8890200988FAFAFAFAFA8999090998AFAFAFAFAF8919090098FAFAFAFAFA8912009098AFAFAFAFAF8910002098FAFAFAFAFA8999999998AFAFAFAFAF8888888888FAFAFAFAFA8888888888AFAFA8888888888888888888888888888888888888888"
	Maps[8] := "8888888888888888888888888888888888888888888888888888888888888C88888888888888C888888C88888888888888C88C88899999999998C888888C99050900009988C88C88902011112009C888888C90029999020988C88C88900098890099C888888C99999889999888C88C88888888888888C888888C88888888888888C8888888888888888888888888888888888888888888888888888888888888"
	Maps[9] := "8888888888888888888888888888888888888888888888888888888888888888A8888888888A8888888AF8889999888FA88888AFA8899009888AFA888AFAF8895209888FAFA88FAFA8899209988AFAF88AFAF8899020988FAFA888AFA8891200988AFA88888AF8891131988FA8888888A8899999988A888888888888888888888888888888888888888888888888888888888888888888888888888888888888"
	Maps[10] := "88888888888888888888888888888888888888888888888888888888888888E8888889999888E888888888888900988888888E8E88889920988E8E8888888899911098888888E8E8E890211098E8E8E8888888902905988888888E8E88902000988E8E888888889000999888888888E8889999988888E88888888888888888888888888888888888888888888888888888888888888888888888888888888888"
	Maps[11] := "8888888888888888888888888888888888888888E888888888888888888EE888889999999888888EE889999000009888888EE889000199909888888EE889090900009988888EE889090202910988888EE889090030090988888EE889019202090988888EE889900009090999888EE888909991050009888EE888900000990009888EE888999999999999888E8888888888888888888888888888888888888888"
	Maps[12] := "8888888888888888888888888888888888888888F888888888888888888F800999999000999000188009000092000200111880290500000999991118800900999200900999C88029909E902090201C888000909E92000001C8888202909E9020901C888880000099920001C888888129000000009C888888801900000000C8888888F888888888888888888F8888888888888888888888888888888888888888"
	Maps[13] := "8888888888888888888888888888888888888888888888888888888888888888999998F8F8F8F8F88C889000988F8F8F8F88888892009888F8F8F8888899900299888F8F888888900202098888F888889990C0CC0988899999989000C0CC09999900119890200200000000001198999990CCC0959900119888889000009999999998888899999998888888888888888888888888888888888888888888888888"
	Maps[14] := "8888888888888888888888888888888888888888E888888888888888888EE899888888888888998EE899888899999998998EE899888990090598998EE899888900090098998EE899888920202098998EE899888902990098998EE899899902090998998EE899891111100988998EE899899999999988998EE899888888888888998EE888888888888888888E8888888888888888888888888888888888888888"
	Maps[15] := "88888888888888888888888888888888888888888888888888888888888888AAA8888999999998888A888A888900000598888A888A8889029209988888AAA888890200298888888888888992020988888999999999020909998889111100990200200988899111000020020009888911110099999999998889999999988888888888888888888888888888888888888888888888888888888888888888888888"
	Maps[16] := "8888888888888888888888888888888888888888888899999988999888888E8891100989959988E888E89110099900098E888888911000002209888888889110090C0209888888889119990C0209888888889999020C2009888888888889002C020988888888888902002009888888E88889009900098E888E8888899999999988E8888888888888888888888888888888888888888888888888888888888888"
	Maps[17] := "8888888888888888888888888888888888888888888888888899999888888B889999999000998B88888990905990220988888B890000200000098B88888900200999000988888B899909999929998B88888902009990119888888B890202020111988B88888900009991119888888B890220989111988B8888890099989999988888888999988888888888888888888888888888888888888888888888888888"
	Maps[18] := "88888888888888888888888888888888888888888888888888888888888888888888888888888888888A89999999988F888888AF89000050988AF8888AFA89021100998FAF888FAF899911C0098AFA888AFA88899222098FAF8888AF88889000098AF888888A88889999998F88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888"
	Maps[19] := "88888888888888888888888888888888888888888888899999999998888888F899190000009999F8888991190200209009888889111909902090098888F911111009220009F8888991111200009209888889999099999990098888F900020000000099F8888900209002902099888889029990209022098888F900059009900009F8888999999999999999888888888888888888888888888888888888888888"
	Maps[20] := "88888888888888888888888888888888888888888888888888888888888888E888888888888E88888888E899998888888E8888E888900999888E88888888E895000999888E8888E88890C200198E88888888E890202119888E8888E888902019998E88888888E890099988888E8888E888999988888E88888888E888888888888E88888888888888888888888888888888888888888888888888888888888888"
	Maps[21] := "8888888888888888888888888888888888888888F888888888888888888F8999999999999999999889C1C1C1C1C1C1C1C1988912020202020200009889C0C0C0C0C0C0C0C0988912000002000000029889C0C0C0C0C0C0C0C0988910000000020002009889C0C0C0C0C0C0C0C0988910000000000200059889999999999999999998F888888888888888888F8888888888888888888888888888888888888888"
	Maps[22] := "8888888888888888888888888888888888888888888899999999988888888EE890000000988A8A888EE8900200029888E888888899990000988A8A88888888890200998888888888999900020988888888889110209909999888888891100299000098888AA891100002000098888AA8919992999095988888889198900000999888888899989999999888888888888888888888888888888888888888888888"
	Maps[23] := "8888888888888888888888888888888888888888888888888888888888888B8889999999888888B88888890005098888888888B889020C0999988B88888889C02C21119888888B8B890002011198B8B88888890CC0209998888888B88900002098888B88888889990000988888888B8888899999988888B888888888888888888888888888888888888888888888888888888888888888888888888888888888"
	Maps[24] := "88888888888888888888888888888888888888889999999999999999998890000000000000000998902C00020CC002000098900002CCC0000C02209891CCC000002020CC00999111C00C00C0000C2009911CC22CCCC0200C00099111C00000020CC009999111200CCC00C00009099911002C00CC000CC50989919000000000000009889999999999999999998888888888888888888888888888888888888888"
	Maps[25] := "88888888888888888888888888888888888888889999999999988899999990000090009889900009990200900099990020099999022000911900900990020020099119999099902000999111100022099009290001111909020990900902011999290009909000209119000990099000290099990009029990900900005900000098999999999999999999988888888888888888888888888888888888888888"
	Maps[26] := "88888888888888888888888888888888888888889999999999999999999990009000090009000959902000000200020009099909991199099900000990009111192900299909902091111900200202099000911119090902020990009911990009290009992990000990090092999000200200000900900990009000090009000009999999999999999999998888888888888888888888888888888888888888"
	Maps[27] := "88888888888888888888888888888888888888888888888888888888888888899999999999988D88888911009000009998888889110090200200988888891100929999009888888911000050990098888889110090900209988888899999909920209888888889020020202098888D8889000090000098888DD88999999999999888888888888888888888888888888888888888888888888888888888888888"
	Maps[28] := "88888888888888888888888888888888888888889999999999999999999990090099000090005999990000200009029990099929020992902020000990002900002000000999909900020999009111199090290909090911119990000202090091111998992099900209111199889009020000000099988E900000090900009888E899999999999999988E8E8888888888888888888888888888888888888888"
	Maps[29] := "8888888888888888888888888888888888888888999999999999999999999500000999000900900990909009002002000009999990000090202929099191190000992020000991111100002000900099911111000099929929999191190000200009000999999000009009200209DDDD9009002000020209DDDD9009009009009009DDDD99999999999999998888888888888888888888888888888888888888"
	Maps[30] := "88888888888888888888888888888888888888889999999999999999999999111000990900009009911110000000002099099111190909299920000991119000090000000909991900920900000299099009009020209990020990000020020900909909990909909229029009099009000202090000009990000900000900900059999999999999999999998888888888888888888888888888888888888888"
	Maps[31] := "8888888888888888888888888888888888888888C99999999999999C99999000900959099009999990C090020000200C999990C0000CCCCCC0200C9C9000C00C1111C0022009992CC2CC1111C00000099000000C1111CC2CC2999002200C1111C000000990200200C00C00CCC009C999C002000200002009999990900009009000C99999C9999999999999998888888888888888888888888888888888888888"
	Maps[32] := "88888888888888888888888888888888888888889999999A9999A99C99999000009A9119A9000009902200999119990025099009099111111900200C900000911111190020099999009991199C99C20990002220911900009009C029000200200220920990090099020099009009902000020CC020000209900900990000990090099999C9999999999999998888888888888888888888888888888888888888"
	Maps[33] := "8888888888888888888888888888888888888888999999999999999999999000090090900900C00990590C09902000200099999909000090090200099000090990C20C909C0990000002000200020009911C9922C9029C20990991191900902000209009911119022000C9209C999111190099999000000991119990000000000009999999999999999999998888888888888888888888888888888888888888"
	Maps[34] := "88888888888888888888888888888888888888889C9999C9999999C99C99C1111C0000000C00C0099111190C020020000009911110C90029090292099111C000200029002009911C99900C020002200C90000009C9C099C909C9900000000C000C000009909C000900020902020990C900002099020020099000005C00000C000C0C999999C99999C999C9C98888888888888888888888888888888888888888"
	Maps[35] := "888888888888888888888888888888888888888899999999999999999999911119E9000000000009911119E9990900929099911119E9000920020009911119E9000020092299990099E902900920200999009EE9002002009009950099992999299020099900000000900900200999000999009002009999999999E9009009000009999999999999999999998888888888888888888888888888888888888888"
	Maps[36] := "8888888888888888888888888888888888888888AFFFFFAFFFFFFAFFFFFAF00000F000005F111AFFF00000F000000AA111AFF0A0A0AA2AA0AA01111FF00020F000222001111FAFA2AFA02200AFA0AA1FF00000200A0000F0FFFAF00200A00AFA00A0A00FAA0A2AA000020022000FF00020AA000A00A0A00FF00000F0000F00F0000FAFFFFFAFFFFAFFAFFFFA8888888888888888888888888888888888888888"
	Maps[37] := "8888888888888888888888888888888888888888C99999C99C99C999999C9000009009111C50000990900000001111C000099002009000C1111C000990992999909C1111C009902000200900C11190099022090009000C022009C9900222900022002009902009009000090290099000290090000000200990090000900009009009C99C9999C9999C99C99C8888888888888888888888888888888888888888"
	Maps[38] := "8888888888888888888888888888888888888888999999C999C999999999C500000C000C000000099C09C909C009C99090C990000C0900220000000C9009090C0209020990C990000020C009220C000C9009C900C0000009C0C991191C020C002090000C9119190020C09902200991111C90002200200909911111C900000000C00999999999999999999C998888888888888888888888888888888888888888"
	Maps[39] := "8888888888888888888888888888888888888888B888999899999999999B88889599919911199009888992001191119000098899000011111190020989900209111119909099890022909999900202098902902000099002200989009009000090200209890002209990929900098902900000020200209989900009000090000998B899999999999999998B8888888888888888888888888888888888888888"
	Maps[40] := "88888888888888888888888888888888888888889999999999999999999990090000009000900099902902020991112002099002009099111190200990990209911119000209902000091111990200099029900911190000000990002229929900999099909090090009009000099020900200990000000990000900009500000009999999999999999999998888888888888888888888888888888888888888"
	Maps[41] := "88888888888888888888888888888888888888889999999999999999999990090090900009009009900020000002020000099909009299929900990990002000002009002009909992992900090200099090002020099999902990200220200959191119909000009009091911199099999999990911111990000000000009111119999999999999999999998888888888888888888888888888888888888888"
	Maps[42] := "88888888888888888888888888888888888888889999999999999999999890090000090099000099902900020900000990099020020091190000020990202009111190009099902900911111199902099000900911119009200990200999911900090009990200099090902002998990200002952029000988990009000000090009888999999999999999998888888888888888888888888888888888888888"
	Maps[43] := "888888888888888888888888888888888888888899999999999999999AAA90020001111900009999900000011110000000099090999999999900000990920009000000999119900200092299900091199020999020000000911990209000202090099119900900220902099000999599029002002000009A9900000009900000099AA99999999999999999AA8888888888888888888888888888888888888888"
	Maps[44] := "8888888888888888888888888888888888888888CCCCCCCCCCCCCCCCCCCCC000000009000950900CC022009229090900990CC009020209220900000CC909009009090900900CC000990000000900000CC000902090009000900CC020920900090020911CC920900999900009111CC002000000000091111CC000900900000911111CCCCCCCCCCCCCCCCCCCCC8888888888888888888888888888888888888888"
	Maps[45] := "88888888888888888888888888888888888888889999999999988899999990000090009889900009990200900099990020099999022000911900900990020020099119999099902000999111100022099009290001111909020990900902011999290009909000209119000990099000290099990009029990900900005900000098999999999999999999988888888888888888888888888888888888888888"
	Maps[46] := "88888888888888888888888888888888888888889999999999999999999990009000900009000959900020020000090209099929029990900002290990090091999009202009900929111190090999099020091111199000090999200919111192202009900999999119909009099002000000000209990990009000900000000909999999999999999999998888888888888888888888888888888888888888"
	Maps[47] := "8888888888888888888888888888888888888888DDDDDDDDDDDDDDDDDDDDD090909000959900090DD000000000000020000DD009929099999020909DD900009911111900900DD929929111119992920DD000909911111900909DD002000099119900900DD020900020002002220DD902002909009002000DD000990009009000000DDDDDDDDDDDDDDDDDDDDD8888888888888888888888888888888888888888"
	Maps[48] := "888888888888888888888888888888888888888888888889999999999988888888890000000009888888888900002020098899999989020CCCCC098890000999990200CC29889000000020200000098890000000000990CC098890000995999990CC098890000999988890CC09989111198888889020009891111988888890000098999999888888999999988888888888888888888888888888888888888888"
	Maps[49] := "88888888888888888888888888888888888888889999999999999888888890000000000098888888909990220000988888889000902002009888888890029999299999988888902099000000009999989002202000000001119899909902290000011198889099000900000111988890000009000001119888999599999999999998888999988888888888888888888888888888888888888888888888888888"
	Maps[50] := "88888888888888888888888888888888888888888899999998888888888888900000999999999888889000009000090099888890200090002020098888900200900209900988889022009920200009888899090099099999998888990900990000111988889009200000001119888890002200000011198888900000995900111988889999999999999999888888888888888888888888888888888888888888"
	Maps[51] := "88888888888888888888888888888888888888889999999999999999999990900000900000000009900000002009909990999999900990002002000999119900909020909009911110020000099290999111100299999000929999119090090009002009F9919090020002009059F9002002090009009999F9000000099999999FFFF999999999FFFFFFFFFF8888888888888888888888888888888888888888"
	Maps[52] := "88888888888888888888888888888888888888888888888888888888888888A88A88A88A88A88A888888888999998888888888A88999005988888A888888890021099888888888A88900121098888A888888899903209888888888A88889000998888A888888888999998888888888A88A88A88A88A88A8888888888888888888888888888888888888888888888888888888888888888888888888888888888"
	Maps[53] := "8888888888888888888888888888888888888888888888888889999888888BBBB99999990598EEE88BBB8900000200988EE88BB889000299029888E88B88899291119098888888888890211100988888888888909101909988888E8888900090920988B88EE88892002000098BB88EEE889009999999BBB88EEEE899998888888888888888888888888888888888888888888888888888888888888888888888"
	Maps[54] := "88888888888888888888888888888888888888889999999999999999999999990090099999999999999900900911199999999990029009111009999999902092201110099999999002900911101999999990009029999999999999992000000020209999999900900220900099999999999990099225999999999999900000099999999999999999999999998888888888888888888888888888888888888888"
	Maps[55] := "8888888888888888888888888888888888888888DDDD8888888888888888DEED8889999999988888DEED8889000910988888DDDD8899002111988888888888900209319888888888899099290998888888888900020020988888888889000900009888888888899999995098DDDD8888888888899998DEED8888888888888888DEED8888888888888888DDDD8888888888888888888888888888888888888888"
	Maps[56] := "888888888888888888888888888888888888888888888888888888888888888E88888888888E8888888E88999999988E8888888E88900C00988E8888888E88902020988E8888888E88901310988E8888888E899C111C988E8888888E89002220988E8888888E89000500988E8888888E89999999988E8888888E88888888888E8888888888888888888888888888888888888888888888888888888888888888"
	Maps[57] := "8888888888888888888888888888888888888888888888888899998888888899999999900998888889900200000020999998890009909900099111988909220202292991119889090005000900011198890029099922000111988902002200209911119889992000000099999998888900999999988888888B899998888888BBBBB8888888888888888888888888888888888888888888888888888888888888"
	Maps[58] := "88888888888888888888888888888888888888889999999999999999999E9000059900000090009E9000099000020000209E900999111190909009999000911119090902000999909111900900000009E9009919000002000209E9002020999009090999E9020000000909020009E9990200290909090209EEE90000000009090099EEE9999999999999999E8888888888888888888888888888888888888888"
	Maps[59] := "8888888888888888888888888888888888888888888888888888888888888C88888888888888C888888C88888888888888C88C88888899999988C888888C88999000098888C88C88899102990998C888888C89112020059888C88C88891102020998C888888C89999990098888C88C88888888999988C888888C88888888888888C8888888888888888888888888888888888888888888888888888888888888"
	Maps[60] := "88888888888888888888888888888888888888889999AAAAAAAA999999999009999999999000005990290000900000999999900000099990009009AA999990000000009009AA900020000000009009999002999900900090000990C09009119299900C0990C092091190020022099000000911900900090990009009119009000909999999999999999999998888888888888888888888888888888888888888"
	Maps[61] := "888888888888888888888888888888888888888888888BBBB8888888888888888888889998B8888888888999999198B8888888888910020098B8888888888990CCC29888888888888892CCC0998888888888B8906020198888888888B8919999998888888888B8999888888888888888888888BBBB88888888888888888888888888888888888888888888888888888888888888888888888888888888888888"
	Maps[62] := "88888888888888888888800000000000000000088000000000000000000882C09999999999990C0880C09999999999990C0881C09999999999990C0880C09991020999990C0880C09999990999990C0880C09999994099990C0880C09999999099990C0880C09999999099990C1880C09999999099990C0880C09999999299990C28800000000200010000088000000000010000000888888888888888888888"
	Maps[63] := "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA888888888888888888888888888888888888888888899999999999999888888900000000000098888889009999999900988888890090000009009888888900900040090098888889099000000900988888890090000009909888888910200000020198888889999999999999988888888888888888888888BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
	Maps[64] := "8888888888888888888888DDDDDDDDDDDDDDDD8888DEEEEEEEEEEEEEED8888DECCCCCCCCCCCCED8888DEC9999999999CED8888DEC9120000219CED8888DEC9090920909CED8888DEC9090910909CED8888DEC9090490909CED8888DEC9090290909CED8888DEC9120000219CED8888DEC9999999999CED8888DECCCCCCCCCCCCED8888DEEEEEEEEEEEEEED8888DDDDDDDDDDDDDDDD8888888888888888888888"
	Maps[65] := "B888888888888888888BB888888888888888888BB899999999999999998BB890000099790011198BB890002200000011198BB890092000000011198BB899090099000011198BB899090099099999998BB890220099202000098BB890020090020990098BB890200090002020098BB890000090000900998BB890000099999999988BB899999998888888888BB888888888888888888BB888888888888888888B"
	Maps[66] := "AAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBB888888888888888888888899999988888888888888900009899998888888889099099900999999988890911100000200009888909919909099000098889001119090200229988890911190922200098888909090909020022988889000000090790009888899999999999999998888888888888888888888AAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBB"
	Maps[67] := "FFFFFFFFFFFFFFFFFFFFF888888999999999998FF888888900000000098FF888888900002020098F99999989020CCCCC098F90000999990200CC298F9000000020200000098F9000000000000000098F90000000000990CC098F90000997999990CC098F90000999988890CC099F9111198888889020009F9111198888889000009F9999998888889999999FF888888888888888888FFFFFFFFFFFFFFFFFFFFF"
	Maps[68] := "D88888888A888888888D8D8888888A88888888D888D89998999999988D88888D91989000009998888888919992CCC0959888888891100002000098888888911002CC000098888888911020CC09999888AAAA9999000209AAAAAA8888888902009988888888889999000098D88888888890020002988D8888888D900000009888D88888D89999999998888D888D8888888A88888888D8D88888888A888888888D"
	Maps[69] := "CCCCCCCCCCCCCCCCCCCCC888888888888888888CC888888888899998888CC889999999990099988CC889002020000011988CC889000209900011988CC889000209900011988CC889000029900011988CC889000009900011988CC889990999999999988CC888902999599900988CC888900200000020988CC888902099990020988CC88890009AA90000988CC88899999AA99999988CCCCCCCCCCCCCCCCCCCCC"
	Maps[70] := "EEEEEEEEEEEEEEEEEEEE88888888888BD888EEEE99999999999B8D888EEE90000900009B88D888EE90020900009B888D888E90200900009BB888D88E90020900209BBB888D8E99000200209BBBB888DEE9099900209BBBBBBBBB99020999299999999999902209000000000011199020090000000000111990000900000000001119999499000000000011198899999999999999999988888888888888888888"
	Maps[71] := "DD8888888888888888DDDD8888888888888888DDDD8888888888999888DD999999999999949998DD911100000900000098DD9111000009000CC098DD9111000009220CC0999D9111000000002022009D9999900000000CC0209DDD889999992CCCC2009DDD888890020020C0009DDD888890000220CCC09DDD88889000000000009DDD88889999999999999DDD8888888888888888DDDD8888888888888888DD"
	Maps[72] := "99999EEEEE999999999990009EEEEE900000000990C09999999020C0C00990C1100000000CC0020990C1CCCCCCCC00C0020990C1C020000002CCC209900000CCCCC020C000099991CCCC0CC002720009E90111C000C022290099E911110000C00209999EE91CCCC00CCCC00009EEE91100C00000CCCC09EE999900CCCCC0000009EE902002000C00099999EE90000009000099EEEEEE9999999999999EEEEEEE"
	Maps[73] := "CCCCCCCCCCCCCCCCCCCCC11C0000C0000000000CC1200200C22002CC02CCC12C00CCC00CC0CC000CC00C020C00220002000CC0CCC00C0C00C200CCCCC00CC0C02000C40C000CC020000200CC1CC0020CC00C02C02C0200000CCCC00C00C00C000CCC000CC00CCCCCCCC0C000000CC00000000000C00C1C1CCC2CCCCCCCC2C000111CC00001300C0000CC1C1CC013111300020011111CCCCCCCCCCCCCCCCCCCCC"
	Maps[74] := "88888888888888888888888888888888888CCCC8999998888888888CBBC8900099999999998CBBC8900090000000098CBBC8902200002020098CBBC8902099099999098CBBC8902099290002298CCCC89002990909990988888890000202099909999998900099000000001111989999990000000011119888888900000000111198888889959999999999988888889998888888888888888888888888888888"
	Maps[75] := "888888888888888888888888888888888888888888BBBBBBB9999999998888BFFFFFB9009000098888BBBBBBB900220009888899999999002009998888911100990990995998889111009920020000988891110000220220009888911100990200020098889999999909999099988888888889000002098888888888890990000988888888888900009999888888888889999998888888888888888888888888"
	Maps[76] := "89999999999999888888891111111199998888888911199990900999998889111900999000020988891112200000202009888900190020290200998889111909290002009888891909020002000098888910092999299992988889900900020200009888889009002520090098888890090999902002988888900900009990009888889009022098999998888890090000988888888888999999999888888888"
	Maps[77] := "88888888888888888888889999999998999999988890099000989000009888900020009890999098889000200099902090988890299000000220009888900990009999000098889909999999999995988890299EE9000011999888900099990000119888889002200000001198888890209999000011988888900098890000119888889999988999999998888888888888888888888888888888888888888888"
	Maps[78] := "BC8888888888888888CBBC9999999999999999CBBC9000000000911119CBBC9000020000011119CBBC9999909900911119CBBC9000020909990009CBBC9009900009000009CBBC9909002909099999CBBC8909020209090009CBBC8909002009000009CBBC8909299999999099CBBC8902520200002009CBBC8900200009990009CBBC8999900099899999CBBC8888999998888888CBBC8888888888888888CB"
	Maps[79] := "EEEEEEEEEEEEEEEEEEEEEEEEEEEE99999999999EEEEEEEEE90009000009EE99999EE90000020209EE90009999902990C099EE902099000C09902009EE902006220C09922209EE990CCC000C09900009EE890C000CCC09999929EE990C00000200911119EE900CCC0990209111199E9020002090009112109E9009902090099111109E9999900099999911199EEEEE99999EEEE99999EEEEEEEEEEEEEEEEEEEEE"
	Maps[80] := "FFFFFFFFFFFFFFFFFFFF8888888888888888888899999999999999999999900000900000091119E99000009005000991119990909099299099011119900020900022200111199992999022009990991990000020090000909999900200900999009090099909299000020022000990002099000900909009900000900009009000099999999999999999999988888888888888888888FFFFFFFFFFFFFFFFFFFF"
	Maps[81] := "DDD9999999999DDDDDDDD889000000009999888DD889099999909009988DD889090202020020988DD889000000092000988DD889992002290099988DD888890099090299888DD888899290002079888DD888889002020999888DD888889090002009888DD888889099000909888DD888899009999909888DD888890000000009888DD888891111111999888DD888891111111988888DDDDDD999999999DDDDDD"
	Maps[82] := "99999999EEE999999999999990099999009999999888900025200098888999999202020202999999988990202020209988899999020202020209999998890000000000098889999999999099999999999888888900098888888999999999000999999999988889313131398888899999991313131999999998888931313139888889999999131313199999999888893139313988888999999999999999999999"
	Maps[83] := "8888888888888888888888888888888888888888999999999999999999999090000090000000000990000000200C9099C09999999009C000200200099911990090C020C090099111100200000992C0999111100299C990009299991190C009000C002009E991C090020002009079E9002002090009009999E9000000099999999DDDE999999999DDDDDDDDDD8888888888888888888888888888888888888888"
	Maps[84] := "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC00000CCC11CCC00000CC02200CCC11CCC00260CC00C0CC111111C00200CC00000C111111C00200CCCCC00CCC11CCCCCC20CC0002220C11C0000C00CC02C000200200220C20CC00C00CC0200CC00C00CC02000020CC02000020CC00C00CC0000CC00C00CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"
	Maps[85] := "889999998999999BBBBB889000098900009BBBBB899099099902009BBBBB890220000022009BBBBB8900209909909099999B8909020200009090009B89020020090990900099890090920009909000098999909009999090990988900202990090000009889020200000909099998990990999009001111989000909990009011119890002290004001111198900090000909991111989999999999998999999"
	Maps[86] := "DDDDDDDDDDDDDDDDDDDD8888888888888888888899999999999999999999900900009000090090099000290090000000200990200900900009029009999002229000220020099022090009000902200990200020090091119009909929999099111190099002009000911119000990900000001111900509900000900911190000099999999999999999999988888888888888888888DDDDDDDDDDDDDDDDDDDD"
	Maps[87] := "888888888888888888888888888888888888888899999999999999999999900090091190090009099000000911900900090990909209119002002209909090091192999009099002999900900090000990002000000000900999999990000000009009EE900000099990009009EE9029000090000099999990099999999990000079999988888888999999998888888888888888888888888888888888888888"
	Maps[88] := "88999988888888888888899009988888888888888902009999999999999989000090111111111119899202901CCCCCCC0C19899000990CCCCCCC0C19897222000000000000198900009909999999900989999902200098889999888902000020988888888889020022099888888888890022009988ABAB8888890000099888BABA8888899000998888ABAB8888889999988888BABA8888888888888888888888"
	Maps[89] := "89898989898989898989989898989898989898989999999999999989999990099000000009991119900000099999009111199999029900022091111990090200020900919119909902992099229991199000200020002000000990990990290990900009900020900900009099999900020002099090970990090090090900900009999999999999999999998989898989898989898998989898989898989898"
	Maps[90] := "DDDDDDDDDDDDDDDDDDDD88888888888888888888CCCCCCCCCCCCCCCCCCCCC000000009000900960CC022009229090900990CC009020209220900000CC909009009090900900CC000990000000900000CC000902090009000900CC020920900090020911CC920900999900009111CC002000000000091111CC000900900000911111CCCCCCCCCCCCCCCCCCCCC88888888888888888888DDDDDDDDDDDDDDDDDDDD"
	Maps[91] := "888888888888888888888DDDD8899998DDDDDDD88DDD88990098DDDDDDD88DD889900098DDDDDDD88D889902209888DDDDD88D899020029998888DD88D8900020000999988888D8900999990900999888D8902111190900009888D8909111102000909888D890911319090200988888909990999900999888899299002709999888888900000209998888DD888900099009888DDDDD888999999999888888888"
	Maps[92] := "888888888888888888888888888888888888888888889999999999999998888890900009009000999999900200020000200990200200C00C00CCC0099002200C1111C00000099000000C1111CC2CC299992CC2CC1111C00000099000C00C1111C002200990C0000CCCCCC020099990C0900200002009998890009009094990098888999999999999999988888888888888888888888888888888888888888888"
	Maps[93] := "88888888888888888888BBBBBBBBBBBBBBBBBBBB9999999999999999999B9090090000790000009B900029009999000902999090002091190009900990900902011999290009900929000111190902099020009991111000220990020020099119999099999902200091190090099902009000999900200990000090009BB990000999999999999BBB999999BBBBBBBBBBBBBBBBBBBB88888888888888888888"
	Maps[94] := "99998888888888888888900999999999999998A8900900011911111198A8900909099999011198A899290000111111119888900099299999900999989020900000999999409899209020009999990098900209222990000000989000000C0000C2C299989099990C2222200009889090000200000C00098890900099000000009998909999992999999020989000000009EEEE9000989999999999EEEE999998"
	Maps[95] := "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB9999999999999999999B9009000090990001119990990200000000011119900002999290909111199090000000900009111990992000009029009199902009990202090090099099090090200200000990900920922909909099990000009020200090099700090090000090000999999999999999999999BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
	Maps[96] := "AAAAAAAAAAAAAAAAAAAA8888888888888888888899999999999999999999911119000000090090099111190C020020000009911110CC00290902C2099111900020002900200991199990090200022009900000099990999909999000000009000900000990CC000900020902020990CC000020CC02002009900000790000090009099999999999999999999988888888888888888888AAAAAAAAAAAAAAAAAAAA"
	Maps[97] := "888888888888888888888888888888888888888888999999999999999999899190000000000000099911002C00CC000CC6099111200CCC00C00009099111C00000020CC00999911CC22CCCC0200C00099111C00C00C0000C200991CCC000002020CC0099900002CCC0000C022098902C00020CC00200009890000000000000000998999999999999999999888888888888888888888888888888888888888888"
	Maps[98] := "8888888888888888888888888888888888888888999999999999999999999490009000900009000990900020002000000209900000CCC0CC11CCC09990CCC200C2C1111C00099020200200C1111C020990202090C0C1111C00099000C29000CC11CC0009992C00900CC0000CC299900C009000002002000990000090009000090009999999999999999999998888888888888888888888888888888888888888"
	Maps[99] := "88888888888888888888DDDDDDDDDDDDDDDDDDDD9999999999999999999B9000009900000090009B9050099000020000209B900999111190909009999000911119090902000999909111900900000009A9009919000002000209A9002020999009090999A9020000000909020009A9990200290909090209AAA90000000009090099AAA9999999999999999EFFFFFFFFFFFFFFFFFFFF88888888888888888888"
	Maps[100] := "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB999999999999999999999400000900090000000999099909900999909099900009090022000000099009090902090209909990000020900922090009900999009000000990999119190209002090000991191900209099022009911119900022002009099111119900000000900999999999999999999999BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
	Maps[101] := "EEEEEEEEEEEEEEEEEEEE8888888888888888888899999999999999999998900900000090009000999029020209911120020990020090991111902009909902099111190002099020000911119902000990299009111900000009900022299299009990999090900900090090000990209002009900000009900009000096000000099999999999999999999988888888888888888888EEEEEEEEEEEEEEEEEEEE"
	Maps[102] := "888888888888AAAAAAAA888888888888A8888888999999999999999999999609009090000900900990002000000202000009990C00929C929900C90990002000002009002009909C929C29000902000990C00020200999999029902002202009A9191119999000009009A9191119889999999999A9111119888888888888A9111119AAAAAAAAAAAAA99999998888888888888888888888888888888888888888"
	Maps[103] := "9999999999999998888891111111111001999988911111111112219009889999999999920C00099890000002002001002098900C2CC000C0020C00989000000C000CC00C09989002C00C0CC00CCC09989020C2CCC0000C8C09989990020C00C00CCC0998999000020CC0C00C0998890200C002002020009889002002C22200900098890090020000009999988905990090090098888889999999999999988888"
	Maps[104] := "EEEEEEEEEEEEEEEEEEEE888888888888888888888CCCCCCCCCCCCCCCCC88CC0000000CC000C00CC8C5CC02C00200200000C8C00C00220C020CC000CCC020C0002020C00CC11CC020CCC020002000C11CC002000C22CCC000C11CC0C2000C000000CCC11CC0C0CCCCCCCCCC00000CC000000111100000000CC0000001111C0000CCCCCCCCCCCCCCCCCCCCC88888888888888888888888EEEEEEEEEEEEEEEEEEEE"
	Maps[105] := "888888899998888888888FFFF8890099999888888FFFF889200000998888888889990CC0020998888888890020C0202698888888892000CC099998888888890202C1111988888888992000C1111988888888990220011119888888889000209011198888888890020299999988888888999000988888888888888999029888888888888888890098888FFFF8888888899998888FFFF888888888888888888888"
	Maps[106] := "8888999999999888888888889111100099888888888891C1C00209988888888991111C0C07998888888901111C00C0099888888900000C20CC209888888990CCC002000098888888920020202C009888888890C002020CC098888888900CCC00CC009888888890000CC0CC099888888890020C002009888888889992020009998888888888900999998888888888889999888888888888888888888888888888"
	Maps[107] := "8888888888888888888888888899999999888888899999900000099998888970002020C90000988889920202C29C0C9098888990220091111110999889000900C111111000988900200291111110C09889020C22011111129098899020029C909C900098889020020020020099988890200200200200988888999999000999999888888888899999888888888BBBBB88888888BBBBB888888888888888888888"
	Maps[108] := "8888888888888888888889999988AAAAAAAAAAA889000998888888888888890200999999999888888990C0900000009999998990C0002C29400900098900C0000002090002098900CCC09999999990998900CC0113111110909E8990CC031311313090998902CC099999990992098900200020020000200989009000900090009009899999999999999999998888888888888888888888888888888888888888"
	Maps[109] := "99999999999999999999C9C9C9C9C9C9C9C9C9C9CCCCCCCCCCCCCCCCCCCCC000C000C0000C000C0CC000200200000C020C0CCC2C02CCC0C000022C0CC00C00C1CCC00C20200CC00C2C1111C00C0CCC0CC0200C11111CC0000C0CCC200C1C1111C220200CC00CCCCCC11CC0C00C0CC00200000000020CCC0CC000C000C00000000C5CCCCCCCCCCCCCCCCCCCCC9C9C9C9C9C9C9C9C9C9C99999999999999999999"
	Maps[110] := "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE9999999999999999EEEE9499919911199009EEE99200119111900009EE990000111111900209E9900209111119909099E9002290999990020209E9029020000990022009E9009009000090200209E9000220999092990009E9029000000202002099E990000900009000099EEE9999999999999999EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"
	Maps[111] := "888888888888888888888CCCCCCCCCCCC89999988C8888888888889000988C8888889999999090988C8899999952000000988C8890009990299020988888902000020999909889999029009099A990988900000029909999009989099099090020092009890911190900000000098900111009990099999989091119098999988888890909990988888888C889000000098CCCCCCCC889999999998888888888"
	Maps[112] := "888888888889999988888DDDDDD88889111988A88DDDDDD88899111988A88DD888899991111988A88DD899991111119999888DD890000011119009888DD89029990099900998888890090092902020988999909920020000209889002220009090090098890000020290992009988900902020900200298889999000026209200988888890000900990099888888999999999900988888888888888889999888"
	Maps[113] := "8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D999999999999999999999000000900900099000990002009009092002099902220020002000902099009009911990000200999090091111199090009902929991111192992999009009111119900009999090209999909299009900002000000000000099090009949000909090999999999999999999999D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8"
	Maps[114] := "E8888888888888888888E89998888888888CCCC8E89099888899998888C8E8900999999009998888E8900090202202099988E8900207020000200988E8902090920020000988E8900990909990999988E8909900009002009888E89991110990202098C8E89911119900020098C8E89111199020029998C8E89111999002009888C8E891119F9009999888C8E899999F99998888CCC8E8888888888888888888"
	Maps[115] := "AA999998888888888888AA900099999988999998AA902020200999900098A9900CC0CC0990002098A9020020000020200098990000099099002099989022999990999990988890000099709E999299889900209992999002098889990099900090020988888902200090202209888889009900090000098888899991011999999988888891111111119888888888911111111198888888889999999999988888"
	Maps[116] := "899999999999DFDFDFDF891111110009999999998911111100090099000989119990200002000009891110202090009900098911192999990000900989990000900092009209888900220202002990098889002000929209920988899909909000099009888890020209909999998888900002002009888888889900090900098888888889999959999988888888888889998888888888888888888888888888"
	Maps[117] := "99999999999999999999999999999900099999999999999902200900009999999999000209222099999009992020290200999990000000900020009999909999909009992099900100099020020009999991CC099909999909999111100900209902009991110C090220990200999111100920220000009991111997020099220099911119900000990009999111199999999999999999999999999999999999"
	Maps[118] := "CD8989999999999998F88FE8B9000000000099ADB8A98900C002202009E9888F892002C00C0079CB9CB8990C00C020C09988A88F9000200200C098EC89ED9000C02000C09DA8D8C8900202000000989FCBA8900000CC00209CB8888890000CC022C098E8F9999992200090009888E91111900999999998FDC91C1110998B88D898898911110009F88E8C8B8AA9111100098C8B8888AE89999999998D88F8E88D"
	Maps[119] := "88888888888888888888888888888888888888889999999999999E9999999000000000009E9111199909290090999E9111199000200290009E9111199922900200009E9111199002029009209EE900999009002002009EE9009990020992999299990069900200900900000000999999002009009990009E9000009009009E99999E9999999999999EEEEEEE8888888888888888888888888888888888888888"
	Maps[120] := "888888888888888888888FFFFFFFFFFFFFFFFFF88FFFF88888888FFFFFF88FFF88999999888888888888899060099999998899999902CC200002098890020020000022020988902CC00C0CCC0CC009889000020C000020009988992CC02CC2900000988890020200209999999998900C0900C0091111119890000900200911111198902C090CC200111119989900090000900011198889999999999999999988"
	Maps[121] := "88888888888888888888888888888888888888888888899999999998888888888888888888988888888889999999989888888888891000009898888888888999020098988888888888890000989888888888898907009888888888888989002099988888888889890000019888888888898999999998888888888988888888888888888889999999999888888888888888888888888888888888888888888888"
	Maps[122] := "88888888888888888888888AAA8888888AAAA888888A88888888888AA888888A89999999998AA888888889100000098888888888899990CC0998888888888900000020988888888889000040009888888888890200000098888888888990CC099998888888888890000010988888888AA89999999998A888888AA88888888888A888888AAAA8888888AAA8888888888888888888888888888888888888888888"
	Maps[123] := "8888888888888888888888888888888888888888888888888888888888888888899999999999888888888910900000098888888889009000C009888888888930900000298888888889000070000988888888892000009039888888888900C00090098888888889000000901988888888899999999999888888888888888888888888888888888888888888888888888888888888888888888888888888888888"
	Maps[124] := "8888888DDD88888888888888888DDD88888888888888888DDD8888888888888888888888888888888AAAA8899999888888888AAAA8896009888888888AAAA8890229998888888AAAA8891210198BBBB8888888899900098BBBB8888888888900098BBBB8888888888999998BBBB88888888888888888888888888888888FFF88888888888888888FFF88888888888888888FFF88888888888888888888888888"
	Maps[125] := "88888888888888888888888888888888888888888888889999999998888888888890000000988888888888900CCC009888888888889001010098888888888890001000988888888888999000999888888888888890C0988888888888888892229888888888888888907098888888888B888899999888B888888B888888888888B888888B888888888888B88888BBB8888888888BBB8888888888888888888888"
	Maps[126] := "888888888888888888888888BBB88B88888888B888B888BBBB88BBBB888888B888888888888888888888899999999888888888888900000099888B8888BB8901909109888B88888B8900901009888B88888B8902220009888B88888B8900040099888BB8888B8999999998888BB8888B8888888888888888888BBB888888888B88888888B88888BBBBBB88888B88888888B88888888888888888888888888888"
	Maps[127] := "88888888888888888888888888888888888888888AAA899999999998AAA88AAA890243101098AAA88AAA890299209098AAA88AAA890000000098AAA88AAA899902909998AAA88AAA888910909888AAA8888888890000988888888FFF888900009888FFF88FFF888999999888FFF88FFF888888888888FFF88FFF888AAAAAA888FFF88FFF888AAAAAA888FFF88FFF888AAAAAA888FFF888888888888888888888"
	Maps[128] := "FAFAFAFAFAFAFAFAFAFAAFAFAFAFAFAFAFAFAFAFFAFAFAFAFAFAFAFAFAFAAFAFA999999999AFAFAFFAFAF900901209FAFAFAAFAFA900009909AFAFAFFAFAF900000249FAFAFAAFAFA990902099AFAFAFFAFAFA9190909AFAFAFAAFAFAF9100009FAFAFAFFAFAFA9000999AFAFAFAAFAFAF99999FAFAFAFAFFAFAFAFAFAFAFAFAFAFAAFAFAFAFAFAFAFAFAFAFFAFAFAFAFAFAFAFAFAFAAFAFAFAFAFAFAFAFAFAF"
	Maps[129] := "8889999999999999998888888888888888888888898889999999999988898988888888888888888989898999999999998989898989000000000989898989890022522009898989898901111111098989898989000000000989898989890C2C2C2C098989898989000000000989898989899999999999898989888888888888888889898889999999999988898888888888888888888888899999999999999988"
	Maps[130] := "88988888898888889888888888888888888888888888888888889888888888889888888888888988888888999888889888888988899099998888888888888900100999888888888889009002098888888988890190990988889888888990220109888888888888900400098888888888889999999988888888888888888888888988889888888888888888888888888988889888888888888888888888888888"
	Maps[131] := "8888888888888888888888988E8888B8888D888888888888888888888898888F888C8888888A88888D88899999999988888888888901000109888E888888890900990988888888888902200909888C8888B889420001098888888888899999000988888888A88888899999888B88888888888888888888888888888F8888888888888E88C888888888D888F88888888889888888A88888888888888888888888"
	Maps[132] := "AAAAA8888888888AAAAAAA8888888888888888AAA888888888888888888AA888899999999999888AA888890000004009888A8888890001C22209888888888900000002098888888889000999010988888888890C09390C0988888888890109990009888888888900000000098888A888890000C10009888AA888890000000009888AA888899999999999888AAA8888888888888888AAAAAAA8888888888AAAAA"
	Maps[133] := "888888888888888888888888888888888888888888F8AAAAAAAAAAAA8F8888F8A8888888888A8F8888F8A8999999998A8F8888F8A8910990098A8F8888F8A8900992098A8F8888F8A8900901098A8F8888F8A890000C098A8F8888F8A892CC02098A8F8888F8A8942113098A8F8888F8A8999999998A8F8888F8A8888888888A8F8888F8AAAAAAAAAAAA8F888888888888888888888888888888888888888888"
	Maps[134] := "8888888888888888888888888888888EEEEEEEE88888889999888888888888888990099999999988899999000000000009988911099000CC0CC0009889110992C2202422C09889110000C0000000C0988911000000CCC2C0209889110099220000000098899999990000000099988888888999999900988888888888888889999888888888888888888888888EEEEEEE88888888888888888888888888888888"
	Maps[135] := "8888888888888888888889988888888888888888899888888888888899888888899888888888998888888998999998888888888888889007988888888888889992C098888888888888900120988899888888889000199888998889988890200988888888899888910099888888888888889999988998888888888888888889988888888998888888888888888889988888888888888888888888888888888888"
	Maps[136] := "88888888888888888888888E88999999888E8888888E88900009888E8888888E88902009888E8888888E88999009888E8888888E88889099988E8888888E88899000988E8888888E88890020988E8888888E88890000988E8888888E88899229988E8888888E88894200988E8888888E88892110988E8888888E88891111988E8888888E88899999988E88888888888888888888888888888888888888888888"
	Maps[137] := "8888888888888888888889999989998999989998899888888888888899888988AA899999999899988998AA890210009888988898AA890CC2019889988998888900C0C19899988998899900C0C0988888899899000000009899988998900092CC20989988888890099411209898888998999999999998999889988888888888889998899999999889899889888899988999998999999888888888888888888888"
	Maps[138] := "888888888888888888888BB88888888888888BB88BB88888888888888BB888888999999999988888888889000110009888888888890C0000C2988888888889000CC2C09888888888890C0CC0009888888888891C0200C1988888888889120990009888888888892099990098888888888949988990988888888889998888999888888BB88888888888888BB88BB88888888888888BB888888888888888888888"
	Maps[139] := "888888888888888888888888888888888888888888EEEEEE8999998EE88888EEEEEE8940098EE88888EE88888922298EE88888EE8899990C098EE88888EE8990000C098EE88888EE8902C001098EE88888888930CC0C098EE888888889100C0C098EE888888889900001198EE888888888999999998EE888888888888888888EE88888EEEEEEEEEEEEEEE88888EEEEEEEEEEEEEEE88888888888888888888888"
	Maps[140] := "8888888888888888888888889999999999998888888890000000009888888888909203900988A888888890002430988A888888889000120988A8A8888888901000988A8A8888888890910988A8A8888888889000988A8A88A8888888900988A8A88A8888888890988A8A88A8888888889988A8A88A88A8888888988A8A88A88A8888888888A8A88A88A8A8888888888888888888888888888888888888888888"
	Maps[141] := "888888888888888888888AAAAAAA8888888888888A8888888888888888888A8888888888888888888A8888899999999888888A8889990000009888888A8889012013209888888A8889070CC000988888888889001102209888A8888889000000999888A8888889999999988888A8888888888888888888A8888888888888888888A8888888888888888888A8888888888888AAAAAAA888888888888888888888"
	Maps[142] := "99999999999999999999999899888899989998899898998998898898998998988889988988988989989999999999989889999999990011009998899999989900991098998899998889029030989998999999890200249898889999998990000998988899998889999999999999999889998989998999999998999989898889988899988889898889889899999998998999999888898999999999999999999999"
	Maps[143] := "8888888888888888888888AA88888AA88888AA8888AA88888AA88888AA8888888888888888888888888888999999998888888888889000000988888888888890C2000988888888AA8890205C1988AA8888AA88992C100988AA888888888900001988888888888889999999888888888888888888888888888888888888888888888888AA88888AA88888AA8888AA88888AA88888AA8888888888888888888888"
	Maps[144] := "8C8C8C8C8C8C8C8C8C8CC8C8C8C8C8C8C8C8C8C88C8C8C8C8C8C8C8C8C8CC8C8C8C8C8C8C8C8C8C88C8C8C899999999C8C8CC8C8C99943110098C8C88C8C89090090919C8C8CC8C8C90022009098C8C88C8C89000020009C8C8CC8C8C99999090098C8C88C8C8C8C8999999C8C8CC8C8C8C8C8C8C8C8C8C88C8C8C8C8C8C8C8C8C8CC8C8C8C8C8C8C8C8C8C88C8C8C8C8C8C8C8C8C8CC8C8C8C8C8C8C8C8C8C8"
	Maps[145] := "888888888E888888888888888888E8888888B8888D88888E8888888B888888D88888888888B88888888D8899999888888888888888900099888888888888889000099888888888888890C0249988D8888888889002C209888D8888C888990101098888D8888C88890091998888888888C889999998888888888888888888888F88888888A888888888F88888888A888888888F88888888A88888888888888888"
	Maps[146] := "88888888B888888888888D88888A8888C8888A88888C888888E888889888F8888888888888888888888889999999999888888888890000900098888888B8890CC31CC0988D88888889010C0030988888898889003423209888888888890000000098F88888E8899999999998888888888888888888888888888888888888F8988B8888D888A88888888888888888888888C8888E888888888888888888888888"
	Maps[147] := "8888888888888888888888999889999988899988889898891209888989888899988900098889998888888889909988888888889999990009999999888890099011160090198888920000C0C0C00029888891099020202090098888999999990099999988888888889909988888888899988899099889998888989888900098898988889998889021988999888888888899999888888888888888888888888888"
	Maps[148] := "8888888888888888888888888888888888888888888888888888888888888AAAA8999999988AAAA88A88A8907000988A88A88A88A8902910988A88A88A88A8900020988A88A88A88A8900909988A88A88A88A8900919888A88A88A88A8900029888A88A88A88A8900109888A88A88AAAA8999999888AAAA888888888888888888888888888888888888888888888888888888888888888888888888888888888"
	Maps[149] := "88888888888888888888888888B888888888888888888BB88888888888888888BBB8888BBBB88888888BBBB9999999B8888888888899000409B8888888888890203209B888888888889020900988888888888B9009900988888888888B9011109988888888888B9999999BBBB88888888BBBB8888BBB88888888888888888BB888888888888888888B8888888888888888888888888888888888888888888888"
	Maps[150] := "88888888888888888888888888AAAA8888888888888888A88A8888AA88888A88A888888888A888888AAAA899999988A8888888888891019998AA88888888889190209888888888888890000098888888888888902920988888888AA88899007998888AA888A888899999888888A888A888888888888888A88AA88888888A88A88AA88888AAAA888AAAA888888888A88A88888888888888888888888888888888"
	Maps[151] := "9999999999999999999990000002190000000009909999999909999999099098999999099998890990989000000000988909909890C2CCC020988909909890C1112204988909909890C111C0209889099098902111C200988909909899992CC020988909909888890000009889099098BA8999999998890990988888888888888909909999999999999999099000000000000000000999999999999999999999"
	Maps[152] := "88888A8A88888AA888888AA88A8A8888A8888888888A88A888888AA888888AA8888888888888888888888899999988888AA88888899001099888A88888A88902290098888AA88A8A89102001988888888A8A890090909888888888888990127998888888888888999999888888888A8A8888888888888A888A8A8888AA888888A8A888A8888888A88888A8A888888888AA888888888888888888888888888888"
	Maps[153] := "888888888888B88888888888888BB888BBB8888888BB8888B88888B8888888B88888BB88888888888BB8888999998888888888888899000998888BB888888890002098888B888888889100039888BB888888889192909888888888888890040098888888888888999999988888888888B88888888888888888BBB8B88888BB8BB88888B888BBB888B888B88888888888B88BB888BB8888888888888888888888"
	Maps[154] := "88888888888889999999899999988888890000098999999899999910CC198999999890000002003989999998900999029009899999989009890090098888888890098999999988899999900988888888999910400009888888889001200900099999999990C0099900000000000990202019999990002C0999990009888891C002098889999989989001C2998988888889989100009088888888888899999990"
	Maps[155] := "8888888888888888888888888EE8FFF8BB88888888888EE8FFF8BB8888888888888888888888888888BB89999999998EE88888BB89011002498EE8888888890092990988888888FF89900099998FF88888FF89039031098FF8888888890020000988888888EE89009000998BB88888EE89999999988BB8888888888888888888888888888BB8FFF8EE88888888888BB8FFF8EE88888888888888888888888888"
	Maps[156] := "88888888888888888888888E888888888888E888888888888888888888888E8E8E88999999E8E8E888888888900009888888888E888890120988E88888888899999209888888888888900002198888888888889002C0198888888888889990CC19888888888E8890124C0988E888888888900000098888888E8E8E99999999E8E8E888888888888888888888888E888888888888E88888888888888888888888"
	Maps[157] := "88888888888888888888888999999999999998888889999999999999988888888888888888888888888999999999999998888889999999999999988888899900142010099888888999029020200998888889990191039909988888899901000002099888888999999999999998888889999999999999988888888888888888888888888999999999999998888889999999999999988888888888888888888888"
	Maps[158] := "888888888888888888888EE888888889988888888EE888CC888998888888888888CC88888888FF888888888888999988FF8888888888999009888888888888999002098888888888889060000988888888888890C12299888888888888910010988888888888889999999888888888888888888888BB8888888DD888888888BB8888888DD8888AA888888888888888888AA88888888888888888888888888888"
	Maps[159] := "8888888888888B8888888C888D8888E8888C88D8888888888888888888888B88899999999988F888888889000000098888A888E889000000098888888888899990CC098888888888999000C009888E888F889002C000099888888888902022911198888888889000259101988888888899900999999888A8888888999988888888888C888888888888D8888888888888F888B8888888888A8888888888888888"
	Maps[160] := "88888888888888888888888AAA888888888BBB88888AAA888888888BBB88888AAA888888888BBB88888888999988888888888888889069888888888888DDD89129888888888888DDD89009988888888888DDD890219999888888888888902000098888888999889901000988EEE88999888999999988EEE88999888888888888EEE8888888888FFF88888888888888888FFF88888888888888888FFF88888888"
	Maps[161] := "888888888888888888888AA89999999998888FF88AA89111111199998FF88AA89111199990098FF88AA89991119002098FF88AA88892009090098FF88AA89990020002098FF88AA89020200202098FF88AA89090990220098FF88AA89092992002098FF88AA89090000999998FF88AA89000299988888FF88AA89990098888888FF88AA88940098FFFFFFFF88AA88999998FFFFFFFF888888888888888888888"
	Maps[162] := "8888888888888888888888888CC899999998888888888888911111988CC88C8889999111119888888C8889409211999888888888890290009888888888CC890099299998888888888902200000988C8888888990CC0C20988C8888888900C00C00988888CC88890220CC009888888888890002CC20988888888C8902200009988888888C8900090009888CC8888889999999998C8888888888888888888C8888"
	Maps[163] := "888D889999999998888888D8899888888899888888889988999998899888888998899000998898888899889900213998988888988991001210989888889899002321209898888898900036300098988888989021232009989888889890121001998898888898993120099889988888988990009988998888889988999998899888888889988888889988D888888899999999988D888888888888888888888888"
	Maps[164] := "8888888888888888888888999999999999999998889888888888888888988898999999999999989888989000000000009898888890CCCC0CCCC098888899900000C0000099988890011332C2331100988890C00000000000C09888900C2CCCCCCC2C0098889900102060201009988899999999999999999888888888888888888888889999999999999999988888888888888888888888888888888888888888"
	Maps[165] := "888888888B88888888888B88888888888888888888888B8888888888888888888889999998B888B88888888904009888888888888899229098B888888888889030919888888888B8889000919888888888888890000198888B88888888999921988888888888888890209888888888888888900098888888B88888889999988888888888B888888888B88888888888888888888888B8888888888B8888888888"
	Maps[166] := "88888888888888A8888888A888A88888888888888888888889999988888888888888890009888888888889999900498888A888A889000000398888888888891900091988888888888900000909888888888889020099098A888888888999029009888888888888892090098888A88A888889001009888888888888899999998A8888888A88888888888888888888888A8888888888A8888888888888A8888888"
	Maps[167] := "88888888888888888888888888888888888AAAA88888BBBBBBBBBB88AAA88888B888888888B88AA88888B8999999888B88A88888B8911109998B88888888B8904C20098B88888888B8902020098B88888888B8900090098B88888888B8999999998B88888888B8888888888B88888A88BBBBBBBBBBBB88888AA888888888888888888AAA88888888888888888AAAA88888888888888888888888888888888888"
	Maps[168] := "88888888DDDD8888888888888888888888B8888888888B88888888B88888888BBBBB88888BBB888888888B88999988B88888D8888899900999B8888DD888889001010988888DD8888890C12C0988888DD888889420020988888DD8888B9990099988888D88888B88999988B888888888BBB88888BBBBB88888888B88888888B8888888888B888888888888888888888888888888888888888888DDDD88888888"
	Maps[169] := "99999999999999999999999899888899989998899898998998898898998998988889988988988989989999999999989889999999990Y11009998899999989900991098998899998889029030989998999999890200249898889999998990000998988899998889999999999999999889998989998999999998999989898889988899988889898889889899999998998999999888898999999999999999999999"
	Maps[170] := "89999899999998999988898898910101989889888988989101019898898889889890191098988988899998910001989999888888889111119888888888899999292999998888888900202020200988888889020202020209888888890020202020098888888900000400000988888889999909099999888888888890202098888888899998921212989999888988989101019898898889999899999998999988"
	Maps[171] := "8888888888888888888888DDDDDD888DDDDDD88888D88888DDD88888D88888D8DDDD888DDDD8D88888D8D888888888D8D88888D8D899999988D8D88888D8D894300998D8D888888D88922200988D8888888D88910090988D888888D8D890001198D8D88888D8D899999998D8D88888D8D888888888D8D88888D8DDDD888DDDD8D88888D88888DDD88888D88888DDDDDD888DDDDDD88888888888888888888888"
	Maps[172] := "AA8AA8FF8888FF8AA8AAAA8AA8FFFFFFFF8AA8AA88888888888888888888FF8FF8999999998FF8FFFF8FF8900090098FF8FFF888F8902091198F888FF8A8F8900221198F8A8FF8A8F89420C1198F8A8FF8A8F8900221198F8A8FF8A8F8902090098F8A8FF888F8900299998F888FFF8FF8900098888FF8FFFF8FF8999998888FF8FF88888888888888888888AA8AA8FFFFFFFF8AA8AAAA8AA8FF8888FF8AA8AA"
	Maps[173] := "888888888888888888888A8A8A8888888888988888A8A8888888888888888A8A888889999888989888A888899900988888888A88889901029988988888888890091009888888888888902009098888888888889909100988888888888889620099888888888988890099988888A888888889999888888A888989888888888888A8A8888888888888888A8A8888898888888888A8A8A888888888888888888888"
	Maps[174] := "8888888888888888888888B888888888888888888B8B88888888888888888B8888999999998888888B8B899000011988888888B88902090009888888888889002999198888888888894300000988888888888999900209888888888888889200998888888888888890199888888888888888999988AAAA888888888888888888A888888888888888888A888888888888888888AAAA8888888888888888888888"
	Maps[175] := "88888888888888888888888888888888888888888888888888888888898888888899999988889988888888942119998999888888889022300989998888888899902C0989998888888889900109899988888888890200998999888888888900C198899988888888890010988999888888888999999889998888888888888888899988888888999999999999888888899999999999998888888888888888888888"
	Maps[176] := "88889998888888888888899899999999999899988999988888888888999889998899999999989988899988999999999898888888889900001998998889998999110209989998888989902299999899988899899000999998899889998990C49988888998899889900099888888888999899999998888998888898999999989999988899988888888899998888899889999999989988888888888888888888888"
	Maps[177] := "8888888888888888888888B888888888889999988B8B889999999999009888B88891190020000098888888911900020200988888889111122C2C0998888999911110000209888889021CCC3999999988899902CC001988888888890020200C1999888888890020002C100988888889904022201C0988888888902000291009888B888899999009999988B8B888888999998888888B8888888888888888888888"
	Maps[178] := "888999999999999999888889AAA9EEEEE9AAA9888889A99999999999A9888889A9B9009009B9A988888999990000099999888889E90032C03009E9888889E90003132009E9888889E990C171C099E9888889E90023130009E9888889E90030C23009E988888999990000099999888889A9B9009009B9A9888889A99999999999A9888889AAA9EEEEE9AAA9888889999999999999998888888888888888888888"
	Maps[179] := "A888888889999888888A888888899900998888888888889902020998888888888990200120998888888899021C1012099888888990212101012099888899021012121212098888902121212121C6299888900010100010120098889920C1212121212098888902121212101009988889902101012120998888889902101C120998888888899021002099888888888899020209988888A888888990099988888A"
	Maps[180] := "88888888888888888888888888888888888888888999999999999999999889888888888888888898898999999999999998988989420021103120989889890200031213009898898990202110312098888888900203121300998988989020211031200989889890020312130009898898999999999999998988988888888888888889889999999999999999998888888888888888888888888888888888888888"

	; Theme data
	Themes := [] ; Create array
	Themes["Color"] := "iVBORw0KGgoAAAANSUhEUgAAAeAAAAAgCAMAAAD9lVunAAAAHlB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cbwMY7lIEiPWyb/geG562ZAz1HMGXsfQxtXr2Lz9ML7wYkR87Wr/FF/4DAUca5lALZMf4gN4Q/I35hKgZAAAAABJRU5ErkJggg=="

	; Icon data
	Icons := [] ; Create array
	Icons["Bulldozer16"] := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAG1BMVEVHcEzAwMAAAAD//wCAgID/AACAgACAAAD///9wWJvwAAAAAXRSTlMAQObYZgAAAF9JREFUeNptjgEKwDAIA9Wkc/9/8TQiY7ADaXoE1AIfwqJxahoTTo2QvcTkcA9CsLOEj/ARZDcyq9HZZJHnJDqvOMUKcoXy27jV2LX1P7uW9aIM4J3/DzPT5cpz/6D8AFCgAnWwfBuRAAAAAElFTkSuQmCC"
	Icons["Bulldozer32"] :="iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAG1BMVEVHcEzAwMAAAAD//wD/AACAgACAgICAAAD///+ovIncAAAAAXRSTlMAQObYZgAAALdJREFUeAGVk2GOhjAIRHFE9P4nXiETYqF1P9+fJsxLaUBFBC+Ig30JJMCxAEIQmG1mPNhgBHeCPBKQKmQdWwAZWzzqZHwq+g3AsScH0G4w2x+Y1Rvu4ylEwflFIE0oLfiG84ZvqC2AyGkATRBErqpu9EFRUMeF2agjp5H1KpBvAnGB8aWrNzC/pi3AFp5rmwMneUZ+KSfZd5EXcBd93Rq8rZs5hW9f1L/f5PAHTv8L1mhPRl0A+QMfTwmTv+zr5gAAAABJRU5ErkJggg=="
	Icons["TickGreen16"] := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAV1BMVEUAAAAAAABBhQBEhgBGiQCayQDT8l+bxgDL8E+b0ACazQCbwQCavQCbuABIiQDu+JHk9IPD7z296Ty56y2w6R2r6Qup5wud2ACd0wCasgDl9YHb83Lc9G+zrzKuAAAAAnRSTlMAM8lDrC4AAABtSURBVHjafcvHEoAgDARQjAFFmr3//3ea6FhycQ9L3s6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OCB2Gog/gC2Hg+ySSMz8wAAAABJRU5ErkJggg=="
	Icons["ColorAqua16"] := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUA//9kZGS1lhCsAAAAEklEQVQI12P4/5+hgZFIBFQMAAyoCwtCKbyxAAAAAElFTkSuQmCC"
	Icons["ColorBlack16"] := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAABkZGSh99HRAAAAEklEQVQI12P4/5+hgZFIBFQMAAyoCwtCKbyxAAAAAElFTkSuQmCC"
	Icons["ColorBlue16"] := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAP9kZGR/8tcgAAAAEklEQVQI12P4/5+hgZFIBFQMAAyoCwtCKbyxAAAAAElFTkSuQmCC"
	Icons["ColorFuchsia16"] := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEX/AP9kZGSbNnzsAAAAEklEQVQI12P4/5+hgZFIBFQMAAyoCwtCKbyxAAAAAElFTkSuQmCC"
	Icons["ColorGray16"] := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEWAgIBkZGTj+MOgAAAAEklEQVQI12P4/5+hgZFIBFQMAAyoCwtCKbyxAAAAAElFTkSuQmCC"
	Icons["ColorGreen16"] := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAgABkZGQQEWFDAAAAEklEQVQI12P4/5+hgZFIBFQMAAyoCwtCKbyxAAAAAElFTkSuQmCC"
	Icons["ColorLime16"] := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUA/wBkZGRrkxZdAAAAEklEQVQI12P4/5+hgZFIBFQMAAyoCwtCKbyxAAAAAElFTkSuQmCC"
	Icons["ColorMaroon16"] := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEWAAABkZGS/R8UJAAAAEklEQVQI12P4/5+hgZFIBFQMAAyoCwtCKbyxAAAAAElFTkSuQmCC"
	Icons["ColorNavy16"] := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAIBkZGRMrmfqAAAAEklEQVQI12P4/5+hgZFIBFQMAAyoCwtCKbyxAAAAAElFTkSuQmCC"
	Icons["ColorOlive16"] := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEWAgABkZGQOoXWbAAAAEklEQVQI12P4/5+hgZFIBFQMAAyoCwtCKbyxAAAAAElFTkSuQmCC"
	Icons["ColorPurple16"] := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEWAAIBkZGRSHnMyAAAAEklEQVQI12P4/5+hgZFIBFQMAAyoCwtCKbyxAAAAAElFTkSuQmCC"
	Icons["ColorRed16"] := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEX/AABkZGRFM3odAAAAEklEQVQI12P4/5+hgZFIBFQMAAyoCwtCKbyxAAAAAElFTkSuQmCC"
	Icons["ColorSilver16"] := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEXAwMBkZGQvR8m4AAAAEklEQVQI12P4/5+hgZFIBFQMAAyoCwtCKbyxAAAAAElFTkSuQmCC"
	Icons["ColorTeal16"] := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAgIBkZGT9SNd4AAAAEklEQVQI12P4/5+hgZFIBFQMAAyoCwtCKbyxAAAAAElFTkSuQmCC"
	Icons["ColorWhite16"] := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEX///9kZGRRUrtgAAAAEklEQVQI12P4/5+hgZFIBFQMAAyoCwtCKbyxAAAAAElFTkSu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C8e765nHN3PTq2ngmwXrM5riqrxoVpYH3LqhvK6cEIQPjQuLo0wHQCiYgJJW8aFNKO4h8pIPQC9d8ROIeF6scAAAAASUVORK5CYII="
	Icons["LevelSelect16"] := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAFVBMVEUAAAB4i5z///9OerXxz8/joqLHQ0OomdN0AAAAAXRSTlMAQObYZgAAACVJREFUCNdjgANBCBBgEFICAhEXIMPY2NhINBUqIuQkQH01GAAArVQMUlOJoMoAAAAASUVORK5CYII="
	Icons["Mouse16"] := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAq1BMVEUAAAAAAAAAAACXoq6AjJh5g5BzfYp1fomap7GWoqwaHR9HTVQeICMAAACQnaiOm6fX2Nrh4eL////c3d7DxMb7+vv49/fs6uuYpbD6+fnLzM2Vo66MmKTw7+7n5uezu8SnrbSIlKF/jJlyfoz8/Pzf3t/U1dbS09bO0dTNzc/Gx8i9wcauuL+stLylqbCOmqaIkp6GkZ57hpR5g5F0gY+grLWQn6qPnamEj5r7gqE9AAAAEHRSTlMABjPn59rKp4JuPTk0JuXTpzPyugAAAKFJREFUeNo9y1cSgjAUQNHQm2gMBKX3XhXb/lcmmSfezzNzEUu9slS0J8SUBITGAoK0gRKSE0IHDeDUOMVzjAu3OQLMlkOzMHOdaAYIIsfNq3yDAMB/pC/f99/Z4wdpGV5YYZkC3PAZwjcAsccWC/cigJK0mNWOCoCxeF5d1Z63GACclHS2bXeJxCHocJ82mO4HtKfL62eVdfSPM3meN2H4AuxFD/FyAkagAAAAAElFTkSuQmCC"
	Icons["Progress16"] := "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAflBMVEUAAAAAAACTk5IAAACKiIeGhob////09PWMjIyako2OjY2Sj4zR8v+PyPHq6utNndiXko6SjoyKiop4v/KCw+/h4uNWpd1BmdtTodr7+/z39fWo1fWRzvWGxO7t//+u2/my2/h6xPj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UlEQVQYGWXBVw7CMBBAwUcC600obumFXu5/Q/4sS5lh62Aye8DcwvAMYXhVddcZARNiHMfPd3o0TWMcmPevbWNsp+u9742Deb0k6yywSJXIImD9OfEWUHdKnALqjolXQH2diAIqGQWsZCxQWE1sAZS7TMnGHwoHCZXGVGT/AAAAAElFTkSuQmCC"

	; Background colors data
	BackgroundColors := [] ; Create array
	BackgroundColors["Aqua"] := "00FFFF" ; (0,255,255)
	BackgroundColors["Black"] := "000000" ; (0,0,0)
	BackgroundColors["Blue"] := "0000FF" ; (0,0,255)
	BackgroundColors["Fuchsia"] := "FF00FF" ; (255,0,255)
	BackgroundColors["Gray"] := "808080" ; (128,128,128)
	BackgroundColors["Green"] := "008000" ; (0,128,0)
	BackgroundColors["Lime"] := "00FF00" ; (0,255,0)
	BackgroundColors["Maroon"] := "800000" ; (128,0,0)
	BackgroundColors["Navy"] := "000080" ; (0,0,128)
	BackgroundColors["Olive"] := "808000" ; (128,128,0) [Default]
	BackgroundColors["Purple"] := "800080" ; (128,0,128)
	BackgroundColors["Red"] := "FF0000" ; (255,0,0)
	BackgroundColors["Silver"] := "C0C0C0" ; (192,192,192)
	BackgroundColors["Teal"] := "008080" ; (0,128,128)
	BackgroundColors["White"] := "FFFFFF" ; (255,255,255)
	BackgroundColors["Yellow"] := "FFFF00" ; (255,255,0)

	; GDI+ Startup
	hGdip := DllCall("Kernel32.dll\LoadLibrary", "Str", "Gdiplus.dll") ; Load module
	VarSetCapacity(GdiplusStartupInput, (A_PtrSize = 8 ? 24 : 16), 0) ; GdiplusStartupInput structure
	NumPut(1, GdiplusStartupInput, 0, "UInt") ; GdiplusVersion
	DllCall("Gdiplus.dll\GdiplusStartup", "PtrP", pToken, "Ptr", &GdiplusStartupInput, "Ptr", 0) ; Initialize GDI+

	; Midi Startup
	hMidi := DllCall("Kernel32.dll\LoadLibrary", "Str", "Winmm.dll")
	VarSetCapacity(strh_MIDIOut, (A_PtrSize = 8 ? 24 : 16), 0)
	DllCall("Winmm.dll\midiOutOpen", "UInt", &strh_MIDIOut, "UInt", 0, "UInt", 0, "UInt", 0, "UInt", 0, "UInt")
	h_MIDIOut := NumGet(strh_MIDIOut)
	MidiVolume := (100 / 100) * 0xFFFF
	DllCall("Winmm.dll\midiOutSetVolume", "UInt", h_MIDIOut, "UInt", MidiVolume | MidiVolume << 16)

	; Create HICON from Base64 encoded data strings
	pIcon16 := GdipCreateFromBase64(Icons["Bulldozer16"], 1) ; 16x16
	pIcon32 := GdipCreateFromBase64(Icons["Bulldozer32"], 1) ; 32x32
	pTickGreen16 := GdipCreateFromBase64(Icons["TickGreen16"], 1) ; 16x16
	pCrossPink16 := GdipCreateFromBase64(Icons["CrossPink16"], 1) ; 16x16
	pJoystick16 := GdipCreateFromBase64(Icons["Joystick16"], 1) ; 16x16
	pColorAqua16 := GdipCreateFromBase64(Icons["ColorAqua16"], 1) ; 16x16
	pColorBlack16 := GdipCreateFromBase64(Icons["ColorBlack16"], 1) ; 16x16
	pColorBlue16 := GdipCreateFromBase64(Icons["ColorBlue16"], 1) ; 16x16
	pColorFuchsia16 := GdipCreateFromBase64(Icons["ColorFuchsia16"], 1) ; 16x16
	pColorGray16 := GdipCreateFromBase64(Icons["ColorGray16"], 1) ; 16x16
	pColorGreen16 := GdipCreateFromBase64(Icons["ColorGreen16"], 1) ; 16x16
	pColorLime16 := GdipCreateFromBase64(Icons["ColorLime16"], 1) ; 16x16
	pColorMaroon16 := GdipCreateFromBase64(Icons["ColorMaroon16"], 1) ; 16x16
	pColorNavy16 := GdipCreateFromBase64(Icons["ColorNavy16"], 1) ; 16x16
	pColorOlive16 := GdipCreateFromBase64(Icons["ColorOlive16"], 1) ; 16x16
	pColorPurple16 := GdipCreateFromBase64(Icons["ColorPurple16"], 1) ; 16x16
	pColorRed16 := GdipCreateFromBase64(Icons["ColorRed16"], 1) ; 16x16
	pColorSilver16 := GdipCreateFromBase64(Icons["ColorSilver16"], 1) ; 16x16
	pColorTeal16 := GdipCreateFromBase64(Icons["ColorTeal16"], 1) ; 16x16
	pColorWhite16 := GdipCreateFromBase64(Icons["ColorWhite16"], 1) ; 16x16
	pColorYellow16 := GdipCreateFromBase64(Icons["ColorYellow16"], 1) ; 16x16
	pColorCustom16 := GdipCreateFromBase64(Icons["ColorCustom16"], 1) ; 16x16
	pThemeColor16 := GdipCreateFromBase64(Icons["ThemeColor16"], 1) ; 16x16
	pThemeMonochrome16 := GdipCreateFromBase64(Icons["ThemeMonochrome16"], 1) ; 16x16
	pThemeCustom16 := GdipCreateFromBase64(Icons["ThemeCustom16"], 1) ; 16x16
	pAbout16 := GdipCreateFromBase64(Icons["About16"], 1) ; 16x16
	pWebsite16 := GdipCreateFromBase64(Icons["Website16"], 1) ; 16x16
	pCrossRed16 := GdipCreateFromBase64(Icons["CrossRed16"], 1) ; 16x16
	pReset16 := GdipCreateFromBase64(Icons["Reset16"], 1) ; 16x16
	pUndo16 := GdipCreateFromBase64(Icons["Undo16"], 1) ; 16x16
	pLevelSelect16 := GdipCreateFromBase64(Icons["LevelSelect16"], 1) ; 16x16
	pMouse16 := GdipCreateFromBase64(Icons["Mouse16"], 1) ; 16x16
	pProgress16 := GdipCreateFromBase64(Icons["Progress16"], 1) ; 16x16
	pSound16 := GdipCreateFromBase64(Icons["Sound16"], 1) ; 16x16
	pNumber16 := GdipCreateFromBase64(Icons["Number16"], 1) ; 16x16
	p2Undo16 := GdipCreateFromBase64(Icons["2Undo16"], 1) ; 16x16
	pColor16 := GdipCreateFromBase64(Icons["Color16"], 1) ; 16x16
	pTheme16 := GdipCreateFromBase64(Icons["Theme16"], 1) ; 16x16
	pTitleProgress16 := GdipCreateFromBase64(Icons["TitleProgress16"], 1) ; 16x16

	; Create BITMAP from Base64 encoded data strings
	pFontmap := GdipCreateFromBase64(Fontmaps["Pink"]) ; 240x24

	; Create HBITMAP from Base64 encoded data strings
	pIcon16BMP := GdipCreateFromBase64(Icons["Bulldozer16"], 2) ; 16x16
	pIcon32BMP := GdipCreateFromBase64(Icons["Bulldozer32"], 2) ; 32x32

 	; Create a Bitmap object
	DllCall("Gdiplus.dll\GdipCreateBitmapFromScan0", "Int", (GuiWidth * DPI), "Int", (GuiHeight * DPI), "Int", 0, "Int", 0x26200A, "Ptr", 0, "PtrP", pBackgroundImage)

	; Create a Graphics object associated with pBackgroundImage
	DllCall("Gdiplus.dll\GdipGetImageGraphicsContext", "Ptr", pBackgroundImage, "PtrP", pBackgroundGraphics)

	; Set the rendering quality of the pBackgroundGraphics Graphics object
	DllCall("Gdiplus.dll\GdipSetSmoothingMode", "Ptr", pBackgroundGraphics, "Int", 3) ; None

	; Set the interpolation mode of the pBackgroundGraphics Graphics object
	DllCall("Gdiplus.dll\GdipSetInterpolationMode", "Ptr", pBackgroundGraphics, "Int", 5) ; NearestNeighbor

	; Create a SolidBrush object for the background color of the game
	DllCall("Gdiplus.dll\GdipCreateSolidFill", "UInt", "0xFF" BackgroundColor, "PtrP", pBackgroundBrush)

	; Set tray icon options
	Menu, Tray, Icon, % "HICON:*" pIcon16 ; Tray icon
	Menu, Tray, Tip, Bulldozer ; TrayTip Text
	Menu, Tray, NoStandard ; Remove non-custom menu items
	Menu, Tray, Add, E&xit, MenuHandler ; Exit script
}

OnUnload(ExitReason, ExitCode) {
	Global ; Assume-global mode

	; Release resources used by the Image objects
	DllCall("Gdiplus.dll\GdipDisposeImage", "Ptr", pTheme)
	DllCall("Gdiplus.dll\GdipDisposeImage", "Ptr", pFontmap)
	DllCall("Gdiplus.dll\GdipDisposeImage", "Ptr", pBackgroundImage)
	DllCall("Gdiplus.dll\GdipDisposeImage", "Ptr", pIcon32BMP)

	; Delete Graphics objects
	DllCall("Gdiplus.dll\GdipDeleteGraphics", "Ptr", pBackgroundGraphics)
	DllCall("Gdiplus.dll\GdipDeleteGraphics", "Ptr", pControlGraphics)

	; Delete Brush objects
	DllCall("Gdiplus.dll\GdipDeleteBrush", "Ptr", pBackgroundBrush)

	; Clean up resources used by GDI+
	DllCall("Gdiplus.dll\GdiplusShutdown", "Ptr", pToken)

	; Free module from memory
	DllCall("Kernel32.dll\FreeLibrary", "Ptr", hGdip)

	; Destroy icons and free memory
	DllCall("User32.dll\DestroyIcon", "Ptr", pIcon16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pIcon32)
	DllCall("User32.dll\DestroyIcon", "Ptr", pTickGreen16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pCrossPink16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pJoystick16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pColorAqua16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pColorBlack16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pColorBlue16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pColorFuchsia16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pColorGray16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pColorGreen16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pColorLime16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pColorMaroon16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pColorNavy16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pColorOlive16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pColorPurple16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pColorRed16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pColorSilver16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pColorTeal16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pColorWhite16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pColorYellow16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pColorCustom16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pThemeMonochrome16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pThemeCustom16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pAbout16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pWebsite16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pCrossRed16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pReset16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pUndo16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pLevelSelect16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pMouse16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pProgress16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pSound16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pNumber16)
	DllCall("User32.dll\DestroyIcon", "Ptr", p2Undo16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pColor16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pTheme16)
	DllCall("User32.dll\DestroyIcon", "Ptr", pTitleProgress16)

	; Free module from memory
	DllCall("Kernel32.dll\FreeLibrary", "UInt", hMidi)

	; Midi Shutdown
	DllCall("Winmm.dll\midiOutClose", "UInt", h_MIDIOut)

	; Write values to INI file
	IniWrite, % TitlebarProgress, Bulldozer.ini, Options, TitlebarProgress
	IniWrite, % TaskbarProgress, Bulldozer.ini, Options, TaskbarProgress
	IniWrite, % BackgroundColor, Bulldozer.ini, Options, BackgroundColor
	IniWrite, % Theme, Bulldozer.ini, Options, Theme
	IniWrite, % UnlimitedUndo, Bulldozer.ini, Options, UnlimitedUndo
	IniWrite, % Sound, Bulldozer.ini, Options, Sound
	IniWrite, % LevelNumber, Bulldozer.ini, Options, LevelNumber
	IniWrite, % MouseMovement, Bulldozer.ini, Options, MouseMovement
	IniWrite, % LevelNum, Bulldozer.ini, Options, LastLevel

	For Index, Color In UserColors {
		IniWrite, % Format("{:06X}", Color), Bulldozer.ini, Options, % "UserColor" A_Index
	}

	StringSolved := ST_Glue(Solved, "") ; Run-length encoded solved level data
	IniWrite, % RLE_Encode(StringSolved), Bulldozer.ini, Options, Solved
}

ThemeSet(Tileset, Update := 0) {
	Global ; Assume-global mode

	ThemeMatch := "" ; Initialize variable

	For ThemeName, ThemeString In Themes {
		If (ThemeName = (Theme := Tileset)) {
			Menu, ThemesMenu, Check, % (ThemeMatch := ThemeName)
		} Else {
			If (!FileExist(Tileset)) {
				Menu, ThemesMenu, Check, Color
			}

			Menu, ThemesMenu, Uncheck, % ThemeName
		}
	}

	pTheme := (FileExist(Tileset) ? GdipCreateFromPNG(Tileset) : GdipCreateFromBase64(Themes[(ThemeMatch ? ThemeMatch : (Theme := "Color"))]))

	Menu, ThemesMenu, % (!ThemeMatch && FileExist(Tileset) ? "Check" : "Uncheck"), &Custom...

	If (Update) {
		BackgroundLoad(TempMap)
	}
}

BackgroundColorSet(ColorHex) {
	Global ; Assume-global mode

	ColorMatch := "" ; Initialize variable

	; Set brush color
	DllCall("Gdiplus.dll\GdipCreateSolidFill", "UInt", "0xFF" (BackgroundColor := ColorHex), "PtrP", pBackgroundBrush)

	BackgroundLoad(TempMap) ; Generate background with new color

	For ColorName, ColorCode In BackgroundColors {
		If (ColorCode = BackgroundColor) {
			Menu, ColorsMenu, Check, % (ColorMatch := ColorName)
		} Else {
			Menu, ColorsMenu, Uncheck, % ColorName
		}
	}

	Menu, ColorsMenu, % (!ColorMatch ? "Check" : "Uncheck"), &Custom...
}

GuiCreate() {
	Global ; Assume-global mode
	Static Init := GuiCreate() ; Call function

	; Menubar > Game -----------------------------------------------------------
	Menu, GameMenu, Add, &Restart Level`tF2, MenuHandler
	Menu, GameMenu, Add, &Level Select`tF3, MenuHandler
	Menu, GameMenu, Add ; Separator
	Menu, GameMenu, Add, &Undo Last Move`tCtrl+Z, MenuHandler
	Menu, GameMenu, Add ; Separator
	Menu, GameMenu, Add, E&xit`tAlt+F4, MenuHandler
	Menu, GameMenu, Disable, &Undo Last Move`tCtrl+Z
	Menu, GameMenu, Icon, &Restart Level`tF2, % "HICON:*" pReset16
	Menu, GameMenu, Icon, &Level Select`tF3, % "HICON:*" pLevelSelect16
	Menu, GameMenu, Icon, &Undo Last Move`tCtrl+Z, % "HICON:*" pUndo16
	Menu, GameMenu, Icon, E&xit`tAlt+F4, % "HICON:*" pCrossRed16

	; Menubar > Options > Background Color -------------------------------------
	ColorMatch := "" ; Initialize variable

	For ColorName, ColorCode In BackgroundColors {
		Menu, ColorsMenu, Add, % ColorName, MenuHandler
		Menu, ColorsMenu, Icon, % ColorName, % "HICON:*" pColor%ColorName%16

		If (ColorCode = BackgroundColor) {
			Menu, ColorsMenu, Check, % (ColorMatch := ColorName)
		}
	}

	Menu, ColorsMenu, Add ; Separator
	Menu, ColorsMenu, Add, &Custom..., MenuHandler
	Menu, ColorsMenu, % (ColorMatch ? "Uncheck" : "Check"), &Custom...
	Menu, ColorsMenu, Icon, &Custom..., % "HICON:*" pColorCustom16

	; Menubar > Options > Theme ------------------------------------------------
	ThemeMatch := "" ; Initialize variable

	For ThemeName, ThemeString In Themes {
		Menu, ThemesMenu, Add, % ThemeName, MenuHandler
		Menu, ThemesMenu, Icon, % ThemeName, % "HICON:*" pTheme%ThemeName%16

		If (ThemeName = Theme) {
			Menu, ThemesMenu, Check, % (ThemeMatch := ThemeName)
		}
	}

	Menu, ThemesMenu, Add ; Separator
	Menu, ThemesMenu, Add, &Custom..., MenuHandler
	Menu, ThemesMenu, % (ThemeMatch ? "Uncheck" : "Check"), &Custom...
	Menu, ThemesMenu, Icon, &Custom..., % "HICON:*" pThemeCustom16

	; Menubar > Options --------------------------------------------------------
	Menu, OptionsMenu, Add, &Background Color, :ColorsMenu
	Menu, OptionsMenu, Add, &Theme, :ThemesMenu
	Menu, OptionsMenu, Add ; Separator
	Menu, OptionsMenu, Add, Sound Effects, MenuHandler
	Menu, OptionsMenu, Add, Level Number, MenuHandler
	Menu, OptionsMenu, Add, Unlimited Undo, MenuHandler
	Menu, OptionsMenu, Add, Mouse Movement, MenuHandler
	Menu, OptionsMenu, Add, Titlebar Progress, MenuHandler
	Menu, OptionsMenu, Add, Taskbar Progress, MenuHandler
	Menu, OptionsMenu, % (Sound ? "Check" : "Uncheck"), Sound Effects
	Menu, OptionsMenu, % (LevelNumber ? "Check" : "Uncheck"), Level Number
	Menu, OptionsMenu, % (UnlimitedUndo ? "Check" : "Uncheck"), Unlimited Undo
	Menu, OptionsMenu, % (MouseMovement ? "Check" : "Uncheck"), Mouse Movement
	Menu, OptionsMenu, % (TitlebarProgress ? "Check" : "Uncheck"), Titlebar Progress
	Menu, OptionsMenu, % (TaskbarProgress ? "Check" : "Uncheck"), Taskbar Progress
	Menu, OptionsMenu, Icon, &Background Color, % "HICON:*" pColor16
	Menu, OptionsMenu, Icon, &Theme, % "HICON:*" pTheme16
	Menu, OptionsMenu, Icon, Sound Effects, % "HICON:*" pSound16
	Menu, OptionsMenu, Icon, Level Number, % "HICON:*" pNumber16
	Menu, OptionsMenu, Icon, Unlimited Undo, % "HICON:*" p2Undo16
	Menu, OptionsMenu, Icon, Mouse Movement, % "HICON:*" pMouse16
	Menu, OptionsMenu, Icon, Titlebar Progress, % "HICON:*" pTitleProgress16
	Menu, OptionsMenu, Icon, Taskbar Progress, % "HICON:*" pProgress16

	; Menubar > Help -----------------------------------------------------------
	Menu, HelpMenu, Add, &Website..., MenuHandler
	Menu, HelpMenu, Add ; Separator
	Menu, HelpMenu, Add, &About Bulldozer`tF1, MenuHandler
	Menu, HelpMenu, Icon, &Website..., % "HICON:*" pWebsite16
	Menu, HelpMenu, Icon, &About Bulldozer`tF1, % "HICON:*" pAbout16

	; Menubar ------------------------------------------------------------------
	Menu, Menubar, Add, &Game, :GameMenu
	Menu, Menubar, Add, &Options, :OptionsMenu
	Menu, Menubar, Add, &Help, :HelpMenu

	; Parent -------------------------------------------------------------------
	Gui, Parent: Menu, Menubar
	Gui, Parent: +LastFound +OwnDialogs -Resize +HwndhBulldozer
	Gui, Parent: Margin, 0, 0
	Gui, Parent: Color, % GuiBGCol

	Gui, Parent: Add, Edit, x0 y0 w0 h0 0x800 vCatch ; Catch keypresses to avoid dinging

	; About --------------------------------------------------------------------
	AboutText := "Bulldozer is a clone of the original Bulldozer game series created by John 'FlyMan' Hattan (The Code Zone).`n`nThe object of Bulldozer is to push all of the rocks to the targets. Move the bulldozer using the keyboard's WASD or arrow keys. The bulldozer can only push one rock at a time, and it cannot pull rocks. You will advance to the next level when each rock has been placed on a target.`n`nDeveloped for AutoHotkey by:`nWeston Campbell <[email protected]>"

	Gui, About: +ParentParent +HWNDhAbout -Caption -Border
	Gui, About: Margin, 0, 0
	Gui, About: Color, % GuiBGCol

	Gui, About: Add, Picture, x20 y20 w32 h32, % "HBITMAP:*" pIcon32BMP

	Gui, About: Font, c404040 S18 Bold, Arial
	Gui, About: Add, Text, % "x72 yp w" GuiWidth - 144 " h32 0x201", % App_Name

	Gui, About: Font, c404040 S11 Norm, Arial
	Gui, About: Add, Text, % "x72 y+0 w" GuiWidth - 144 " h32 0x201", % "Revision " App_Version " (" App_Date ")"
	Gui, About: Add, Edit, % "x20 y+10 w" GuiWidth - 40 " h" GuiHeight - 178 " 0x800 +Multi -TabStop", % AboutText

	Gui, About: Font ; Reset font options
	Gui, About: Add, Text, % "x-20 y" GuiHeight - 64 " w" GuiWidth + 40 " h1 0x10" ; Divider
	Gui, About: Add, Button, % "x" GuiWidth - 100 " y" GuiHeight - 44 " w80 h24 vAboutOK gControlHandler +Default", OK

	; Level Select 1 -----------------------------------------------------------
	Menu, LevelSelectMenu, Add, &Play, MenuHandler
	Menu, LevelSelectMenu, Add ; Separator
	Menu, LevelSelectMenu, Add, &Solved, MenuHandler
	Menu, LevelSelectMenu, Add, &Unsolved, MenuHandler
	Menu, LevelSelectMenu, Icon, &Play, % "HICON:*" pJoystick16
	Menu, LevelSelectMenu, Icon, &Solved, % "HICON:*" pTickGreen16
	Menu, LevelSelectMenu, Icon, &Unsolved, % "HICON:*" pCrossPink16

	Gui, LevelSelect: +ParentParent +HWNDhLevelSelect -Caption -Border
	Gui, LevelSelect: Margin, 0, 0
	Gui, LevelSelect: Color, % GuiBGCol

	Gui, LevelSelect: Add, Listview, % "x10 y10 w" GuiWidth - 20 " h" GuiHeight - 84 " hwndHLV vVLV List -Multi LV0x10000 LV0x400 gControlHandler AltSubmit", Col1
	Gui, LevelSelect: Default

	HIML := IL_Create(2)
	IL_Add(HIML, "HICON:*" pTickGreen16)
	IL_Add(HIML, "HICON:*" pCrossPink16)

	LV_SetImageList(HIML)

	Loop, 180 {
		LV_Add(Solved[A_Index] = "S" ? "Icon1" : "Icon2", "Level " A_Index)
	}

	Gui, LevelSelect: Font ; Reset font options
	Gui, LevelSelect: Add, Text, % "x-20 y" GuiHeight - 64 " w" GuiWidth + 40 " h1 0x10" ; Divider
	Gui, LevelSelect: Add, Button, % "x" GuiWidth - 100 " y" GuiHeight - 44 " w80 h24 vLevelSelectCancel gControlHandler +Default", Cancel

	; Game ---------------------------------------------------------------------
	Gui, Game: +ParentParent +HWNDhGame -Caption -Border
	Gui, Game: Margin, 0, 0
	Gui, Game: Color, % GuiBGCol

	Gui, Game: Add, Picture, % "x" 0 " y" 0 " w" (GuiWidth * DPI) " h" (GuiHeight * DPI) " vGameImage HwndhBackground 0xE" ; Background image

	; Get pointer to control graphics image
	DllCall("Gdiplus.dll\GdipCreateFromHWND", "Ptr", hBackground, "PtrP", pControlGraphics)

	SubclassControl(hBackground, "BgSubclassProc") ; Subclass static image

	ThemeSet(Theme)
	MapSet(LastLevel)

	Gui, LevelSelect: Show, Hide x0 y0 w%GuiWidth% h%GuiHeight%
	Gui, About: Show, Hide x0 y0 w%GuiWidth% h%GuiHeight%
	Gui, Game: Show, x0 y0 w%GuiWidth% h%GuiHeight%

	Gui, Parent: Show, Center w%GuiWidth% h%GuiHeight%, % "Bulldozer - Level " LevelNum (TitlebarProgress ? " (" PercentText "%) [" RemainderText "]" : "")

	; WM_SETICON - Set icons (TitleBar, Taskbar, ...)
	SendMessage, 0x80, 0, pIcon16,, ahk_id %hBulldozer% ; ICON_SMALL (16x16)
	SendMessage, 0x80, 1, pIcon32,, ahk_id %hBulldozer% ; ICON_BIG (32x32)
}

MenuItemCheck() {
	Global ; Assume-global mode

	; Enable/Disable 'Undo Last Move' menu item
	Menu, GameMenu, % (UndoArray.MaxIndex() ? "Enable" : "Disable"), &Undo Last Move`tCtrl+Z
	UndoState := (UndoArray.MaxIndex() ? 1 : 0)
}

LevelSelectGuiContextMenu(GuiHwnd, CtrlHwnd, EventInfo, IsRightClick, X, Y) {
	If (A_GuiControl = "VLV") {
		If (LV_GetNext() <> "0") {
			Menu, LevelSelectMenu, Show
		}
	}
}

UpdateLV() {
	Global ; Assume-global mode

	Gui, LevelSelect: Default

	Loop, 180 {
		LV_Modify(A_Index, (Solved[A_Index] = "S" ? "Icon1" : "Icon2"))
	}

	LV_Modify(LevelNum, "Select Vis")
}

ParentGuiClose(GuiHwnd) {
	Global ; Assume-global mode

	If (GuiHwnd = hBulldozer) {
		ExitApp ; Terminate the script unconditionally
	}
}

MenuHandler(ItemName, ItemPos, MenuName) {
	Global ; Assume-global mode

	If (MenuName = "GameMenu") {
		If (InStr(ItemName, "&Restart Level")) {
			LevelClearCheck(500)

			; HOTFIX: Levels where bulldozer begins on target tile
			If (LevelNum = "64" || LevelNum = "127") {
				Maps[LevelNum] := MapBackup ; Replace level data
			}

			MapSet(LevelNum)

			ShowHideWindow()
		} Else If (InStr(ItemName, "&Level Select")) {
			UpdateLV()
			ShowHideWindow("LevelSelect", True)
		} Else If (InStr(ItemName, "&Undo Last Move")) {
			UndoMove()
		} Else If (InStr(ItemName, "E&xit")) {
			ExitApp ; Terminate the script unconditionally
		}
	} Else If (MenuName = "ColorsMenu") {
		If (InStr(ItemName, "&Custom...")) {
			BackgroundColorSet(ChooseColor("0x" BackgroundColor, hBulldozer, UserColors*))
		} Else {
			BackgroundColorSet(BackgroundColors[ItemName])
		}
	} Else If (MenuName = "ThemesMenu") {
		If (InStr(ItemName, "&Custom...")) {
			;Gui, Parent: +OwnDialogs
			FileSelectFile, CustomTheme, 3,, Select image..., PNG (*.png)

			If (ErrorLevel) {
				return
			}

			ThemeSet(CustomTheme, true)
		} Else {
			ThemeSet(ItemName, true)
		}
	} Else If (MenuName = "OptionsMenu") {
		If (InStr(ItemName, "Level Number")) {
			LevelNumber := !LevelNumber
			Menu, OptionsMenu, % (LevelNumber ? "Check" : "Uncheck"), Level Number
			BackgroundLoad(TempMap)
		} Else If (InStr(ItemName, "Sound Effects")) {
			Sound := !Sound
			Menu, OptionsMenu, % (Sound ? "Check" : "Uncheck"), Sound Effects
		} Else If (InStr(ItemName, "Unlimited Undo")) {
			UnlimitedUndo := !UnlimitedUndo
			LastUndo := UndoArray.Pop()
			UndoArray := []
			UndoArray.Push(LastUndo)
			Menu, OptionsMenu, % (UnlimitedUndo ? "Check" : "Uncheck"), Unlimited Undo
		} Else If (InStr(ItemName, "Mouse Movement")) {
			MouseMovement := !MouseMovement
			Menu, OptionsMenu, % (MouseMovement ? "Check" : "Uncheck"), Mouse Movement
		} Else If (InStr(ItemName, "Taskbar Progress")) {
			TaskbarProgress := !TaskbarProgress
			Menu, OptionsMenu, % (TaskbarProgress ? "Check" : "Uncheck"), Taskbar Progress

			LevelClearCheck(500)
		} Else If (InStr(ItemName, "Titlebar Progress")) {
			TitlebarProgress := !TitlebarProgress
			Menu, OptionsMenu, % (TitlebarProgress ? "Check" : "Uncheck"), Titlebar Progress

			LevelClearCheck(500)
		}
	} Else If (MenuName = "HelpMenu") {
		If (InStr(ItemName, "&About Bulldozer")) {
			ShowHideWindow("About", True)
		} Else If (InStr(ItemName, "&Website...")) {
			Run, https://autohotkey.com/boards/viewtopic.php?f=6&t=50139
		}
	} Else If (MenuName = "Tray") {
		If (InStr(ItemName, "E&xit")) {
			ExitApp ; Terminate the script unconditionally
		}
	} Else If (MenuName = "LevelSelectMenu") {
		Gui, LevelSelect: Default

		LVSel := LV_GetNext()

		If (InStr(ItemName, "&Solved")) {
			If (Solved[LVSel] = "S") {
				return
			}

			Solved[LVSel] := "S"
		} Else If (InStr(ItemName, "&Unsolved")) {
			If (Solved[LVSel] = "U") {
				return
			}

			Solved[LVSel] := "U"
		} Else If (InStr(ItemName, "&Play")) {
			MapSet(LV_GetNext())
			ShowHideWindow()
			return
		}

		UpdateLV()
		LV_Modify(LVSel, "Select Vis")
		BackgroundLoad(TempMap)
	}
}

ControlHandler() {
	Global ; Assume-global mode

	If (A_GuiControl = "LevelSelectCancel") {
		ShowHideWindow()
	} Else If (A_GuiControl = "AboutOK") {
		ShowHideWindow()
	} Else If (A_GuiControl = "VLV") {
		If (A_GuiEvent = "Normal" && LV_GetNext() <> "0") {
			MapSet(LV_GetNext())
			ShowHideWindow()
		}
	}
}

WM_CTLCOLORBTN(wParam, lParam, Msg, Hwnd) {
	Global ; Assume-global mode
	Static Init := OnMessage(0x0135, "WM_CTLCOLORBTN")

	; Paint button border color to match Gui background color
	return DllCall("Gdi32.dll\CreateSolidBrush", "UInt", "0x" GuiBGCol, "UPtr")
}

WM_KEYDOWN(wParam, lParam, Msg, Hwnd) {
	Global ; Assume-global mode
	Static Init := OnMessage(0x0100, "WM_KEYDOWN") ; Call function
	KF_REPEAT := (lParam & 0x40000000)

	IsAbout := DllCall("IsWindowVisible", "UInt", WinExist("ahk_id " hAbout))
	IsLevelSelect := DllCall("IsWindowVisible", "UInt", WinExist("ahk_id " hLevelSelect))
	IsGame := DllCall("IsWindowVisible", "UInt", WinExist("ahk_id " hGame))

	VK := Format("{:x}", wParam) ; Get virtual-key code

	; Minimize Window (Boss Key)
	If (VK = "20") { ; SPACE
		WinMinimize, ahk_id %hBulldozer%
	}

	If (IsLevelSelect) {
		If (A_DefaultGui <> "LevelSelect") {
			Gui, LevelSelect: Default
		}

		If (VK = "1B") { ; ESC
			ShowHideWindow()
		} Else If (VK = "d") { ; ENTER
			MapSet(LV_GetNext())
			ShowHideWindow()
		} Else If (VK = "26" || VK = "25") { ; UP ARROW/LEFT ARROW
			LV_Modify((LV_GetNext() = 1 ? "180" : LV_GetNext() - 1), "Select Vis")
		} Else If (VK = "28" || VK = "27") { ; DOWN ARROW/RIGHT ARROW
			LV_Modify((LV_GetNext() = 180 ? "1" : LV_GetNext() + 1), "Select Vis")
		} Else If (VK = "24") { ; HOME
			LV_Modify("1", "Select Vis")
		} Else If (VK = "23") { ; END
			LV_Modify("180", "Select Vis")
		} Else If (VK = "21") { ; PAGE UP
			LV_Modify(LV_GetNext() = 1 ? 180 + (LV_GetNext() - 6) : (LV_GetNext() - 5) < 1 ? 180 + (LV_GetNext() - 5) : LV_GetNext() - 5, "Select Vis")
		} Else If (VK = "22") { ; PAGE DOWN
			LV_Modify(LV_GetNext() = 1 ? LV_GetNext() + 4 : (LV_GetNext() + 5) > 180 ? (LV_GetNext() + 5) - 180  : LV_GetNext() + 5, "Select Vis")
		}

		return
	} Else If (IsAbout) {
		If (A_DefaultGui <> "About") {
			Gui, About: Default
		}

		If (VK = "1B") { ; ESC
			ShowHideWindow()
		} Else If (VK = "d") { ; ENTER
			ShowHideWindow()
		}

		return
	} Else If (IsGame) {
		If (A_DefaultGui <> "Game") {
			Gui, Game: Default
		}

		GuiControl, Parent: Focus, Catch

		If (VK = "26" || VK = "57") { ; UP ARROW/W
			Move(0, -1)
		} Else If (VK = "25" || VK = "41") { ; LEFT ARROW/A
			Move(-1, 0)
		} Else If (VK = "28" || VK = "53") { ; DOWN ARROW/S
			Move(0, 1)
		} Else If (VK = "27" || VK = "44") { ; RIGHT ARROW/D
			Move(1, 0)
		} Else If (VK = "21") { ; PAGE UP
			MapSet(LevelNum = "1" ? "180" : LevelNum - 1)
		} Else If (VK = "22") { ; PAGE DOWN
			MapSet(LevelNum = "180" ? "1" : LevelNum + 1)
		} Else If (VK = "1B") { ; ESC
			ExitApp ; Terminate the script unconditionally
		}

		return
	}
}

UndoMove() {
	Global ; Assume-global mode

	IsAbout := DllCall("IsWindowVisible", "UInt", WinExist("ahk_id " hAbout))
	IsLevelSelect := DllCall("IsWindowVisible", "UInt", WinExist("ahk_id " hLevelSelect))

	If (IsAbout || IsLevelSelect) {
		return
	}

	MidiSound(MidiHistory.Pop())

	If (Undo := UndoArray.Pop()) {
		TempMap := Undo[Undo.MaxIndex(), "M"]
		BackgroundUpdate(Undo)
		LevelClearCheck(500)
	}
}

Move(X, Y) {
	Global ; Assume-global mode

	; Get position of bulldozer
	PosNum := RegExMatch(TempMap, "(4|5|6|7)")

	; Get positions of next characters
	PosNumX1 := (PosNum + (Y ? Y * 20 : X))
	PosNumX2 := (PosNum + (Y ? (Y + Y) * 20 : (X + X)))

	; Get character string value of next positions
	PosChrX1 := SubStr(TempMap, (PosNum + (Y ? Y * 20 : X)), 1)
	PosChrX2 := SubStr(TempMap, (PosNum + (Y ? (Y + Y) * 20 : (X + X))), 1)

	; Replace character with value from original map
	Char := SubStr(LevelNum = "64" || LevelNum = "127" ? Maps%LevelNum% : Maps[LevelNum], PosNum, 1)
	ReplaceChar := (RegExMatch(Char, "(2|4|5|6|7)") ? "0" : RegExMatch(Char, "(1|3)") ? "1" : Char)

	; Face bulldozer in direction of requested movement
	Bulldozer := (PosNumX1 = PosNum - 1 ? "6" : PosNumX1 = PosNum + 1 ? "7" : PosNumX1 = PosNum - 20 ? "4" : "5")

	If (PosChrX1 = "") { ; Outside playing area
		MidiSound("69")
		MapUpdate(Bulldozer "|" PosNum)
		return
	}

	If (RegExMatch(PosChrX1, "(8|9|A|B|C|D|E|F)")) { ; Boundaries
		MidiSound("86")
		MapUpdate(Bulldozer "|" PosNum)
		return
	}

	If (PosChrX1 = "3") { ; Target+Boulder
		If (RegExMatch(PosChrX2, "(2|3|8|9|A|B|C|D|E|F)")) { ; Boundaries
			MidiSound("86")
			MapUpdate(Bulldozer "|" PosNum)
			return
		}

		; Target / Everything else
		MidiSound(PosChrX2 = "1" ? "81" : "70")
		MapUpdate((PosChrX2 = "1" ? "3" : "2") "|" PosNumX2, Bulldozer "|" PosNumX1, ReplaceChar "|" PosNum)
		return
	}

	If (PosChrX1 = "2") { ; Boulder
		If (RegExMatch(PosChrX2, "(2|3|8|9|A|B|C|D|E|F)")) { ; Boundaries
			MidiSound("86")
			MapUpdate(Bulldozer "|" PosNum)
			return
		}

		; Target / Everything else
		MidiSound(PosChrX2 = "1" ? "81" : "70")
		MapUpdate((PosChrX2 = "1" ? "3" : "2") "|" PosNumX2, Bulldozer "|" PosNumX1, ReplaceChar "|" PosNum)
		return
	}

	; Everything else
	MidiSound("69") ; Empty space
	MapUpdate(Bulldozer "|" PosNumX1, ReplaceChar "|" PosNum)
}

ProgressCheck() {
	Global ; Assume-global mode
	Static PrevLevel := ""

	If (PosChrX1 = "2" || PosChrX1 = "3" || PrevLevel <> LevelNum) {
		StrReplace(TempMap, "3", "3", BoulderTargetCount)
		PercentText := Round((BoulderTargetCount / (InitTargetCount + InitBoulderTargetCount) * 100), 0)
		RemainderText := (BoulderTargetCount "/" (InitTargetCount + InitBoulderTargetCount))
	}

	PrevLevel := LevelNum

	If (TaskbarProgress) {
		SetTaskbarProgress("N", PercentText, hBulldozer)
	} Else {
		SetTaskbarProgress()
	}
}

LevelClearCheck(Wait := 0) {
	Global ; Assume-global mode

	ProgressCheck()

	; Update window title
	DllCall("User32.dll\SetWindowText", "UInt", hBulldozer, "Str", "Bulldozer - Level " LevelNum (TitlebarProgress ? " (" PercentText "%) [" RemainderText "]" : ""))

	If (!InStr(TempMap, "2")) { ; If all boulders moved to targets
		Solved[LevelNum] := "S" ; Add flag
		LevelNum++ ; Increment level number + 1
		Sleep, % Wait ; Delay before changing level
		MapSet(LevelNum) ; Load next level
	}
}

MapSet(LevelNo) {
	Global ; Assume-global mode

	MapBackup := "" ; Initialize variable
	UndoArray := [] ; Initialize array to store 'Undo' data
	MidiHistory := [] ; Initialize array to store used sound effects

	; Level number validation
	LevelNum := (LevelNo > Maps.MaxIndex() ? "180" : LevelNo < Maps.MinIndex() ? "1" : LevelNo)

	; HOTFIX: Levels where bulldozer begins on target tile
	If (LevelNum = "64" || LevelNum = "127") {
		MapBackup := Maps[LevelNum] ; Backup map
	}

	TempMap := Maps[LevelNum] ; Define TempMap data
	BackgroundLoad(TempMap) ; Generate background image

	; HOTFIX: Levels where bulldozer begins on target tile
	If (LevelNum = "64" || LevelNum = "127") {
		Maps%LevelNum% := StrReplace(TempMap, "4", "1") ; Replace level data
	}

	StrReplace(LevelNum = "64" || LevelNum = "127" ? Maps%LevelNum% : Maps[LevelNum], "1", "1", InitTargetCount)
	StrReplace(LevelNum = "64" || LevelNum = "127" ? Maps%LevelNum% : Maps[LevelNum], "3", "3", InitBoulderTargetCount)

	ProgressCheck()

	; Update window title
	DllCall("User32.dll\SetWindowText", "UInt", hBulldozer, "Str", "Bulldozer - Level " LevelNum (TitlebarProgress ? " (" PercentText "%) [" RemainderText "]" : ""))
}

MapUpdate(PosReplace*) {
	Global ; Assume-global mode

	Update := [] ; Initialize the update array
	Undo := [] ; Initialize the undo array
	UndoMap := TempMap ; Backup previous TempMap value to UndoMap

	For K, V In PosReplace {
		Replacement := SubStr(V, 1, InStr(V, "|") - 1)
		Position := SubStr(V, InStr(V, "|") + 1)
		Current := SubStr(TempMap, Position, 1)
		Before := SubStr(TempMap, 1, Position - 1)
		After := SubStr(TempMap, Position + 1, StrLen(TempMap) - Position)

		TempMap := Before . Replacement . After
		Undo.Push({I: Position, C: Current, M: UndoMap})
		Update.Push({I: Position, C: Replacement})
	}

	If (TempMap "" <> UndoMap "") { ; TempMap changed
		UndoArray.Push(Undo)
		MidiHistory.Push(PlayedNote)
	}

	If (!UnlimitedUndo) { ; If option enabled
		If (UndoArray.MaxIndex() > 1) { ; Number of times to allow 'Undo'
			UndoArray.RemoveAt(1)
		}
	}

	BackgroundUpdate(Update) ; Generate background image
	LevelClearCheck(500) ; Check for remaining boulders
}

BackgroundLoad(MapData) {
	Global ; Assume-global mode

	; Clear graphic to specific color
	DllCall("Gdiplus.dll\GdipGraphicsClear", "Ptr", pBackgroundGraphics, "UInt", "0xFF" BackgroundColor)

	; Generate image using tileset coordinates from map data
	Loop, % StrLen(MapData) {
		MapChar := SubStr(MapData, A_Index, 1)

		If (InStr("89BCDEFA1)", MapChar, 1)) { ; Background Tiles
			DrawTile(MapChar, A_Index)
		}

		If (MapChar = "3") { ; Target/Boulder
			DrawTile("1", A_Index) ; Target
		}

		; HOTFIX: Levels where bulldozer begins on target tile
		If (LevelNum = "64" || LevelNum = "127") {
			If (MapChar = "4") { ; Draw target under Bulldozer
				DrawTile("1", A_Index) ; Target
			}
		}

		DrawTile(MapChar, A_Index)
	}

	; Write text to image
	If (LevelNumber) { ; If option enabled
		pFontmap := GdipCreateFromBase64(Fontmaps[(Solved[LevelNum] = "S" ? "Green" : "Pink")])

		Loop, Parse, % Format("{:3}", LevelNum)
		{
			If (FontCol := InStr("0123456789", A_LoopField, 1)) {
				DllCall("Gdiplus.dll\GdipDrawImageRectRect", "Ptr", pBackgroundGraphics, "Ptr", pFontmap, "Float", ((((24 * A_Index) - 24) + 564) * DPI), "Float", (4 * DPI), "Float", (24 * DPI), "Float", (24 * DPI), "Float", ((FontCol - 1) * 24), "Float", 0, "Float", 24, "Float", 24, "Int", 2, "Ptr", 0, "Ptr", 0, "Ptr", 0)
			}
		}
	}

	; Redraw background image
	GuiControl, Game: +Redraw, % hBackground
}

BackgroundUpdate(arrUpdate) {
	Global ; Assume-global mode
	Static TransRender := 1

	For K, V In arrUpdate {
		DllCall("Gdiplus.dll\GdipFillRectangle", "Ptr", pBackgroundGraphics, "Ptr", pBackgroundBrush, "Float", ((32 * ((!(M := Mod(V.I, 20)) ? 20 : M) - 1)) * DPI), "Float", ((32 * (Ceil(V.I / 20) - 1)) * DPI), "Float", (32 * DPI), "Float", (32 * DPI))

		MapChar := SubStr(LevelNum = "64" || LevelNum = "127" ? Maps%LevelNum% : Maps[LevelNum], V.I, 1)

		If (TransRender) {
			If (InStr("89BCDEFA1", MapChar, 1)) {
				DrawTile(MapChar, V.I) ; Background Tiles
			}

			If (MapChar = "3") { ; Target/Boulder
				DrawTile("1", V.I) ; Target
			}
		}

		DrawTile(V.C, V.I)
	}

	; Redraw background image
	GuiControl, Game: +Redraw, % hBackground
}

DrawTile(TileChar, TilePos) {
	Global ; Assume-global mode

	If (TileCol := InStr("89BCDEFA2317456", TileChar, 1)) {
		DllCall("Gdiplus.dll\GdipDrawImageRectRect", "Ptr", pBackgroundGraphics, "Ptr", pTheme, "Float", ((32 * ((!(M := Mod(TilePos, 20)) ? 20 : M) - 1)) * DPI), "Float", ((32 * (Ceil(TilePos / 20) - 1)) * DPI), "Float", 32 * DPI, "Float", 32 * DPI, "Float", (TileCol - 1) * 32, "Float", 0, "Float", 32, "Float", 32, "Int", 2, "Ptr", 0, "Ptr", 0, "Ptr", 0)
	}
}

GdipCreateFromBase64(B64, RetType := 0) {
	VarSetCapacity(B64Len, 0)
	DllCall("Crypt32.dll\CryptStringToBinary", "Ptr", &B64, "UInt", StrLen(B64), "UInt", 0x01, "Ptr", 0, "UIntP", B64Len, "Ptr", 0, "Ptr", 0)
	VarSetCapacity(B64Dec, B64Len, 0) ; pbBinary size
	DllCall("Crypt32.dll\CryptStringToBinary", "Ptr", &B64, "UInt", StrLen(B64), "UInt", 0x01, "Ptr", &B64Dec, "UIntP", B64Len, "Ptr", 0, "Ptr", 0)
	pStream := DllCall("Shlwapi.dll\SHCreateMemStream", "Ptr", &B64Dec, "UInt", B64Len, "UPtr")
	VarSetCapacity(pBitmap, 0)
	DllCall("Gdiplus.dll\GdipCreateBitmapFromStreamICM", "Ptr", pStream, "PtrP", pBitmap)

	If (RetType = 2) {
		VarSetCapacity(hBitmap, 0)
		DllCall("Gdiplus.dll\GdipCreateHBITMAPFromBitmap", "UInt", pBitmap, "UInt*", hBitmap, "Int", 0XFFFFFFFF)
	}

	If (RetType = 1) {
		DllCall("Gdiplus.dll\GdipCreateHICONFromBitmap", "Ptr", pBitmap, "PtrP", hIcon, "UInt", 0)
	}

	ObjRelease(pStream)

	return (RetType = 1 ? hIcon : RetType = 2 ? hBitmap : pBitmap)
}

GdipCreateFromPNG(File) {
	If (!A_IsUnicode) {
		VarSetCapacity(wFile, 1024)
		DllCall("Kernel32.dll\MultiByteToWideChar", "UInt", 0, "UInt", 0, "Ptr", &File, "Int", -1, "Ptr", &wFile, "Int", 512)
		DllCall("Gdiplus.dll\GdipCreateBitmapFromFile", "Ptr", &wFile, "PtrP", pBitmap)
	} Else {
		DllCall("Gdiplus.dll\GdipCreateBitmapFromFile", "Ptr", &File, "PtrP", pBitmap)
	}

	return pBitmap
}

ChooseColor(StartColor, hOwner := 0, Palette*) {
	Global UserColors
	Static CustomColors

	rgbResult := BGR2RGB(StartColor)
	VarSetCapacity(CustomColors, 64, 0)
	NumPut(VarSetCapacity(CHOOSECOLOR, (A_PtrSize * 9), 0), CHOOSECOLOR, 0)
	NumPut(hOwner, CHOOSECOLOR, A_PtrSize)
	NumPut(rgbResult, CHOOSECOLOR, (A_PtrSize * 3), "UInt")
	NumPut(&CustomColors, CHOOSECOLOR, (A_PtrSize * 4), "UPtr")
	NumPut(0x103, CHOOSECOLOR, (A_PtrSize * 5), "UInt")

	For Index, Value in Palette {
		NumPut(BGR2RGB(Value), CustomColors, ((Index - 1) * 4), "UInt")
	}

	RetVal := DllCall("Comdlg32.dll\ChooseColor", "Ptr", &CHOOSECOLOR)

	If (ErrorLevel <> 0 || RetVal == 0) {
		return Format("{:06X}", StartColor)
	}

	Loop, 16 {
		UserColors[A_Index] := BGR2RGB(NumGet(CustomColors, (A_Index - 1) * 4, "UInt"))
	}

	rgbResult := NumGet(CHOOSECOLOR, (A_PtrSize * 3))
	return Format("{:06X}", BGR2RGB(rgbResult))
}

BGR2RGB(Color) {
	return ((Color & 0xFF) << 16) + (Color & 0xFF00) + ((Color >> 16) & 0xFF)
}

IsWindowVisible(Hwnd) {
	return DllCall("IsWindowVisible", "UInt", WinExist("ahk_id " Hwnd))
}

ShowHideWindow(Name := "", Show := 1) {
	Windows := ["About", "LevelSelect"]

	For K, V In Windows {
		If (V <> Name) {
			Gui, %V%: Hide
		}
	}

	If (Name <> "") {
		Gui, % Name ":" (Show ? "Show" : "Hide")
	}

	GuiControl, Parent: Focus, Catch
}

RLE_Encode(Message) {
	Previous := SubStr(Message, 1, 1)
	Last := SubStr(Message, 0, 1)

	Message .= Asc(Chr(Last) + 1)
	Count := 0

	Loop, Parse, Message
	{
		If (Previous == A_LoopField) {
			Count += 1
		} Else {
			output .= Previous . Count
			Previous := A_LoopField
			Count := 1
		}
	}

	return output
}

RLE_Decode(Message) {
	Pos := 1

	While(Item := RegExMatch(Message, "\D", Char, Pos)) {
		DigPos := RegExMatch(Message, "\d+", Dig, Item)

		Loop, % Dig {
			Output .= Char
		}

		Pos := DigPos
	}

	return Output
}

ST_Glue(Array, Delim := "`n") {
	For K, V In Array {
		New .= V . Delim
	}

	return Trim(New, Delim)
}

SubclassControl(HCTL, FuncName, Data := 0) {
	Static ControlCB := []

	If (Controls.HasKey(HCTL)) {
		DllCall("Comctl32.dll\RemoveWindowSubclass", "Ptr", HCTL, "Ptr", ControlCB[HCTL], "Ptr", HCTL)
		DllCall("Kernel32.dll\GlobalFree", "Ptr", Controls[HCTL], "Ptr")
		Controls.Delete(HCTL)

		If (FuncName = "") {
			return true
		}
   }

	If (!DllCall("User32.dll\IsWindow", "Ptr", HCTL, "UInt"))
	|| (!IsFunc(FuncName) || (Func(FuncName).MaxParams <> 6))
	|| (!CB := RegisterCallback(FuncName,, 6)) {
		return false
	}

	If (!DllCall("Comctl32.dll\SetWindowSubclass", "Ptr", HCTL, "Ptr", CB, "Ptr", HCTL, "Ptr", Data)) {
		return (DllCall("Kernel32.dll\GlobalFree", "Ptr", CB, "Ptr") & 0)
	}

	return (ControlCB[HCTL] := CB)
}

BgSubclassProc(hWnd, uMsg, wParam, lParam, uIdSubclass, dwRefData) {
	Global pControlGraphics, pBackgroundImage

	If (uMsg = 0x0014) { ; WM_ERASEBKGND
		return 1 ; Do nothing
	}

	If (uMsg = 0x000F) { ; WM_PAINT
		; Draw the background image
		VarSetCapacity(PAINTSTRUCT, 60 + A_PtrSize, 0)
		DllCall("User32.dll\BeginPaint", "Ptr", hWnd, "Ptr", &PAINTSTRUCT, "UPtr")
		DllCall("Gdiplus.dll\GdipDrawImage", "Ptr", pControlGraphics, "Ptr", pBackgroundImage, "Float", 0, "Float", 0)
		DllCall("User32.dll\EndPaint", "Ptr", hWnd, "Ptr", &PAINTSTRUCT, "UPtr")
		return 0
	}

	If (uMsg = 0x0002) { ; WM_DESTROY
		SubclassControl(hWnd, "") ; Remove the Subclass
	}

	; Pass all other messages to DefSubclassProc
	return DllCall("Comctl32.dll\DefSubclassProc", "Ptr", hWnd, "UInt", uMsg, "Ptr", wParam, "Ptr", lParam, "Ptr")
}

LV_EX_SetSubItemImage(HLV, Row, Column, Index) {
	Static KnownCtrls := []
	Static OffImage := 20 + (A_PtrSize * 2)

	If (!KnownCtrls.HasKey(HLV)) {
		LV_EX_SetExtendedStyle(HLV, 0x00000002, 0x00000002)
		KnownCtrls[HLV] := True
	}

	LV_EX_LVITEM(LVITEM, 0x00000002, Row, Column)
	NumPut(Index - 1, LVITEM, OffImage, "Int")
	SendMessage, 0x1006, 0, % &LVITEM,, % "ahk_id " HLV
	return ErrorLevel
}

LV_EX_SetExtendedStyle(HLV, StyleMsk, Styles) {
	SendMessage, 0x1036, % StyleMsk, % Styles,, % "ahk_id " HLV
	return ErrorLevel
}

LV_EX_LVITEM(ByRef LVITEM, Mask := 0, Row := 1, Col := 1) {
	Static LVITEMSize := 48 + (A_PtrSize * 3)
	VarSetCapacity(LVITEM, LVITEMSize, 0)
	NumPut(Mask, LVITEM, 0, "UInt"), NumPut(Row - 1, LVITEM, 4, "Int"), NumPut(Col - 1, LVITEM, 8, "Int")
}

EmptyMem(PID := "") {
	PID := (PID = "" ? DllCall("Kernel32.dll\GetCurrentProcessId") : PID)
	h := DllCall("Kernel32.dll\OpenProcess", "UInt", 0x001F0FFF, "Int", 0, "Int", PID)
	DllCall("Kernel32.dll\SetProcessWorkingSetSize", "UInt", h, "Int", -1, "Int", -1)
	DllCall("Kernel32.dll\CloseHandle", "Int", h)
}

SetTaskbarProgress(State := "", Value := "", Hwnd := "") {
    Static TBL := ""

    If (TBL = "") {
        TBL := ComObjCreate("{56FDF344-FD6D-11D0-958A-006097C9A090}", "{EA1AFB91-9E28-4B86-90E9-9E9F8A5EEFAF}")
    }

    State := (State = "I" ? 1 : State = "N" ? 2 : State = "E" ? 4 : State = "P" ? 8 : 0)
    Hwnd := (Hwnd = "" ? WinExist() : Hwnd)
    DllCall(NumGet(NumGet(TBL + 0) + 10 * A_PtrSize), "Ptr", TBL, "Ptr", Hwnd, "UInt", State)

    If (Value <> "") {
        DllCall(NumGet(NumGet(TBL + 0) + 9 * A_PtrSize), "Ptr", TBL, "Ptr", Hwnd, "Int64", Value, "Int64", 100)
    }

    return (TBL ? 0 : 1)
}

MidiSound(Note) { ; Notes: 27-87
	Global ; Assume-global mode
	Static Channel := 9, Velocity := 127
	Static PrevBDPos := "", IdentCount := 0, PrevRepeat := 0, PrevDragMode := 0, DragCount := 0

	If (!Sound) {
		return
	}

	BDPos := RegExMatch(TempMap, "(4|5|6|7)")

	If (BDPos = PrevBDPos && DragMode) {
		DragCount++

		If (DragCount > 1) {
			return
		}
	} Else {
		DragCount := 0
		PrevDragMode := 0
	}

	If (DragMode && (PrevDragMode >= 1) && DragCount) {
		return
	}

	PrevDragMode++

	If (BDPos = PrevBDPos && KF_REPEAT) {
		IdentCount++

		If (IdentCount >= 1) {
			return
		}
	} Else {
		IdentCount := 0
	}

	If (KF_REPEAT && !PrevRepeat && IdentCount) {
		return
	}

	PrevBDPos := BDPos
	PrevRepeat := KF_REPEAT

	PlayedNote := Note ; Used for "Undo" sound effects

	DllCall("Winmm.dll\midiOutShortMsg", "UInt", h_MIDIOut, "UInt", 0x90 | Channel | (Note << 8) | (Velocity << 16), "UInt")
}

WM_LBUTTONDOWN(wParam, lParam, Msg, Hwnd) {
	Global ; Assume-global mode
	Static Init := OnMessage(0x0201, "WM_LBUTTONDOWN")

	If (Hwnd <> hGame) {
		return
	}

	If (MouseMovement) {
		KeyWait, LButton, T0.4

		If (!ErrorLevel) {
			MoveClick()
		}

		DragMode := (ErrorLevel ? 1 : 0)
		SetTimer, MouseDrag, % (ErrorLevel ? 180 : "Off")
	}
}

WM_LBUTTONUP(wParam, lParam, Msg, Hwnd) {
	Global ; Assume-global mode
	Static Init := OnMessage(0x0202, "WM_LBUTTONUP")
	
	DragMode := 0
	SetTimer, MouseDrag, Off
}

WM_MOUSEMOVE(wParam, lParam, Msg, Hwnd) {
	Global ; Assume-global mode
	Static Init := OnMessage(0x0200, "WM_MOUSEMOVE")
	
	VarSetCapacity(TME, 16, 0)
	NumPut(16, TME, 0)
	NumPut(2, TME, 4) ; TME_LEAVE
	NumPut(hGame, TME, 8)

	DllCall("User32.dll\TrackMouseEvent", "UInt", &TME)
}

WM_MOUSELEAVE(wParam, lParam, Msg, Hwnd) {
	Global ; Assume-global mode
	Static Init := OnMessage(0x02A3, "WM_MOUSELEAVE")
	
	DragMode := 0
	SetTimer, MouseDrag, Off
}

AHK_NOTIFYICON(wParam, lParam, Msg, Hwnd) {
	Static Init := OnMessage(0x0404, "AHK_NOTIFYICON")
}

MouseDrag() {
	Global ; Assume-global mode

	If (!DragMode) {
		return
	}

	MouseGetPos, MouseX, MouseY
	ColClick := Ceil(MouseX / (32 * DPI))
	RowClick := Ceil(MouseY / (32 * DPI))

	BDPos := RegExMatch(TempMap, "(4|5|6|7)")
	BDCol := Mod(BDPos, 20)
	BDRow := Floor(BDPos / 20) + 1

	If (ColClick < BDCol) { ; Left
		Move(-1, 0)
	} Else If (ColClick > BDCol) { ; Right
		Move(1, 0)
	} Else If (RowClick < BDRow) { ; Up
		Move(0, -1)
	} Else If (RowClick > BDRow) { ; Down
		Move(0, 1)
	}
}

MoveClick() {
	Global ; Assume-global mode

	MouseGetPos, MouseX, MouseY
	ColClick := Ceil(MouseX / (32 * DPI))
	RowClick := Ceil(MouseY / (32 * DPI))
	ClickPos := (ColClick + (RowClick * 20)) - 20
	BDPos := RegExMatch(TempMap, "(4|5|6|7)")
	BDCol := Mod(BDPos, 20)
	BDRow := Floor(BDPos / 20) + 1

	ClickChar := SubStr(TempMap, ClickPos, 1)

	If (ClickChar <> "0") ; <NOT> Open Area
	&& (ClickChar <> "1") { ; <NOT> Target
		return
	}

	PathMapMid := SubStr(TempMap, ClickPos, 1)
	PathMapPrev := SubStr(TempMap, 1, ClickPos - 1)
	PathMapNext := SubStr(TempMap, ClickPos + 1, StrLen(TempMap) - ClickPos)

	PathMapTemp := PathMapPrev "Z" PathMapNext

	PathMap := ""

	Loop, 16 {
		PathMap .= SubStr(PathMapTemp, A_Index = 1 ? 1 : (A_Index * 20) - 19, 20) "`n"
	}

	PathMap := RegExReplace(RegExReplace(RegExReplace(PathMap, "(4|5|6|7)", "S"), "(0|1)", " "), "(8|9|D|2|3|B|C|E|F|A)", "*")

	Closed := {}

	For Y, Line In StrSplit(PathMap, "`n") {
		For X, Val In StrSplit(Line) {
			If (Val = "*") {
				Closed[X,Y] := true
			} Else If (Val = "S") {
				X1 := X, Y1 := Y
			} Else If (Val = "Z") {
				X2 := X, Y2 := Y
			}
		}
	}

	Path := Astar_Grid(X1, Y1, X2, Y2, Closed)

	IsPath := 0

	For Y, Line In StrSplit(PathMap, "`n") {
		For X, Val In StrSplit(Line "`n") {
			For Index, Cell In Path {
				If (Cell.X = X && Cell.Y = Y && Index >= 1 && Index < Path.MaxIndex()) {
					IsPath++
					Continue 2
				}
			}
		}
	}

	If (!IsPath) {
		return
	}

	BDChar := SubStr(TempMap, BDPos, 1)
	OriginalChar := SubStr(LevelNum = "64" || LevelNum = "127" ? Maps%LevelNum% : RegExReplace(Maps[LevelNum], "(4|5|6|7)", "0"), BDPos, 1)
	OriginalChar := (OriginalChar = "2" ? SubStr(RegExReplace(TempMap, "(4|5|6|7)", "0"), BDPos, 1) : OriginalChar = "3" ? "1" : OriginalChar)
	MapUpdate(OriginalChar "|" BDPos, BDChar "|" ClickPos)
}

Astar_Grid(X1, Y1, X2, Y2, Closed := "") {
	If (!IsObject(Closed)) {
		Closed := {}
	}

	Open := {}, From := {}, G := {}, F := {}
	Open[X1, Y1] := true, G[X1, Y1] := 0
	F[X1, Y1] := Astar_Estimate_F(X1, Y1, X2, Y2)

	While (Open.MaxIndex()) {
		Astar_Lowest_F_Set(X, Y, F, Open)

		If (X = X2 and Y = Y2) {
			return Astar_From_Path(From, X, Y)
		}

		Open[X].Delete(Y)

		If (!Open[X].MaxIndex()) {
			Open.Delete(X)
		}

		Closed[X, Y] := True

		For Index, Near In [{"X": X, "Y": Y-1},{"X": X-1, "Y": Y},{"X": X+1, "Y": Y},{"X": X, "Y": Y+1}] {
			If (Closed[Near.X, Near.Y] = True) {
				Continue
			}

			Open[Near.X, Near.Y] := True, tG := G[X, Y] + 1

			If (IsObject(G[Near.X, Near.Y]) and tG >= G[Near.X, Near.Y]) {
				Continue
			}

			From[Near.X, Near.Y] := {"X": X, "Y": Y}
			G[Near.X, Near.Y] := tG
			F[Near.X, Near.Y] := G[Near.X, Near.Y] + Astar_Estimate_F(Near.X, Near.Y, X2, Y2)
		}
	}
}

Astar_Estimate_F(X1, Y1, X2, Y2) {
	return Abs(X1-X2) + Abs(Y1-Y2)
}

Astar_Lowest_F_Set(ByRef X, ByRef Y, ByRef F, ByRef Set) {
	l := 0x7FFFFFFF

	For tX, Element In Set {
		For tY, Val In Element {
			If (F[tX, tY] < l) {
				l := F[tX, tY], X := tX, Y := tY
			}
		}
	}

	return l
}

Astar_From_Path(From, X, Y) {
	Path := {}, XY := {"X": X, "Y": Y}
	Path.InsertAt(1, XY)

	While (IsObject(From[XY.X, XY.Y])) {
		Path.InsertAt(1, XY:= From[XY.X, XY.Y])
	}

	return Path
}
; ==============================================================================
Todas as versões podem ser encontradas no BulldozerAHK repositório Github:
Image https://github.com/westoncampbell/BulldozerAHK/


Image Imagens do Jogo
Image Image Image Image Image Image Image Image


Image Temas
Image8-bit Fantasy (TheDewd) [Resource]
Image

Image Themes
ImageBulldozer Color (Bulldozer 1)
Image

ImageBulldozer Monochrome (Bulldozer 1)
Image

ImageMonochrome (TheDewd)
Image

ImageMonochrome Black (TheDewd) *Transparent - See the background color
Image

ImageMonochrome White (TheDewd) *Transparent - See the background color
Image

ImageMonochrome Black (Inverted) (TheDewd) *Transparent - See the background color
Image

Image8-bit Fantasy (TheDewd) [Resource]
Image

ImageRacecar 1 (TheDewd) [Resource]
Image

ImageRacecar 2 (TheDewd) [Resource]
Image

ImageChip's Challenge (TheDewd) [Resource]
Image

ImageMario (TheDewd) [Resource]
Image

ImageZelda (TheDewd) [Resource]
Image

ImageNeko (TheDewd) [Resource]
Image

ImageMario Bros. (TheDewd) [Resource]
Image

ImageKid Icarus (TheDewd) [Resource]
Image

ImageAhkban (SpeedMaster)
Image

ImageNeon Rainbow (TheDewd)
Image

ImageTanks (TheDewd) [Resource]
Image

Image Envie seus próprios temas para tê-los incluídos aqui! Image

:arrow: OBS: Obrigado ao usuário TheDewd por compartilhar o script conosco. Todos os créditos de autoria são devidos a ele.
Ardente07
Posts: 5
Joined: 23 Apr 2019, 14:35

Re: [JOGO] Bulldozer (por TheDewd)

23 Apr 2019, 15:38

É incrível a capacidade desta simples linguagem de script, muito obrigado por disponibilizar um tutorial tão completo para iniciantes :clap: , estou aumentando minha produtividade e reduzindo o meu stress na telecom onde trabalho ;) . Seguindo firme e forte para chegar ao seu patamar :dance: .

Return to “Scripts e Funções”

Who is online

Users browsing this forum: No registered users and 3 guests